Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attributeerror: module object has no attribute getuid #354

Open
MrAmbiG opened this issue May 29, 2019 · 1 comment
Open

Attributeerror: module object has no attribute getuid #354

MrAmbiG opened this issue May 29, 2019 · 1 comment

Comments

@MrAmbiG
Copy link

MrAmbiG commented May 29, 2019

  • deployed nsot on kubernetes
  • python 2.7.9 installed and working
  • installed nsot python api with pip
  • Ran nsot networks list
  • It asked to create nsot conf file and told me to choose between 2 types of authentication
  • I chose auth_token and filled out the details as shown in the screenshot
  • I chose the other auth_header option and filled out the details
  • In both cases on windows/linux machines I got the same error.
    Authentication process aka the conf file creation fails + cli commands fail for the same reason.

C:\Users<username>.pynsotrc not found; would you like to create it? [Y/n]: Y
Please enter url: http://:31719/api
Please choose auth_method [auth_token, auth_header]: auth_token
Please enter secret_key: bUakl-wsHuIW0R_FbzR-GtqCOSZJ3TkmmvS7BybXfV4=
Please enter email: nsot@nsot.com
Please enter default_site (optional): 1
Please enter api_version (optional):
Traceback (most recent call last):
File "C:\Python27\Scripts\nsot-script.py", line 11, in
load_entry_point('pynsot==1.3.2', 'console_scripts', 'nsot')()
File "c:\python27\lib\site-packages\click\core.py", line 764, in call
return self.main(*args, **kwargs)
File "c:\python27\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\python27\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\python27\lib\site-packages\click\core.py", line 1135, in invoke
sub_ctx = cmd.make_context(cmd_name, args, parent=ctx)
File "c:\python27\lib\site-packages\click\core.py", line 641, in make_context
self.parse_args(ctx, args)
File "c:\python27\lib\site-packages\click\core.py", line 1089, in parse_args
rest = Command.parse_args(self, ctx, args)
File "c:\python27\lib\site-packages\click\core.py", line 940, in parse_args
value, args = param.handle_parse_result(ctx, opts, args)
File "c:\python27\lib\site-packages\click\core.py", line 1477, in handle_parse_result
self.callback, ctx, self, value)
File "c:\python27\lib\site-packages\click\core.py", line 96, in invoke_param_callback
return callback(ctx, param, value)
File "c:\python27\lib\site-packages\pynsot\commands\callbacks.py", line 26, in process_site_id
log.debug('GOT DEFAULT_SITE: %s' % ctx.obj.api.default_site)
File "c:\python27\lib\site-packages\pynsot\app.py", line 125, in api
self._api = client.get_api_client(**self.client_args)
File "c:\python27\lib\site-packages\pynsot\client.py", line 353, in get_api_client
client_args = dotfile.Dotfile().read()
File "c:\python27\lib\site-packages\pynsot\dotfile.py", line 65, in read
self.validate_perms()
File "c:\python27\lib\site-packages\pynsot\dotfile.py", line 78, in validate_perms
if s.st_uid != os.getuid():
AttributeError: 'module' object has no attribute 'getuid'

@jathanism
Copy link
Contributor

Oof, at least in what you pasted here, you're running native on Windows, which is not currently a supported platform. Only UNIX-variant operating systems are supported right now. (See: https://nsot.readthedocs.io/en/latest/installation.html#platform-specific-installation-instructions)

You said you tried Linux. Can you please give it another shot and report back with specifics if you run into any issues? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants