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 'os' has no attribute 'getuid' #58

Closed
11 tasks
phairplay opened this issue Sep 26, 2022 · 2 comments · Fixed by #59
Closed
11 tasks

AttributeError: module 'os' has no attribute 'getuid' #58

phairplay opened this issue Sep 26, 2022 · 2 comments · Fixed by #59
Labels
bug Something isn't working module:stats

Comments

@phairplay
Copy link

phairplay commented Sep 26, 2022

Reporting Issues:

hi can you please help. ive installed all the required packages, yet i get the below error when running htpc.py
could you please help

  • Lastest

  • master2

  • Commit hash

  • Windows

  • Python version 3.7

  • the program to start

  • the program to start

  • What you expected?

  • How can we reproduce your issue?

  • What are your (relevant) settings?

  • FULL log (not just a few lines!) that has the error.

Expand log
Paste your full log here
C:\HTPC-Manager3>python3 htpc.py
2022-09-26 22:02:04 :: root :: INFO :: Welcome to the Python 3 port of Hellowlol's HTPC Manager fork
2022-09-26 22:02:04 :: root :: INFO :: Loglevel set to info
2022-09-26 22:02:04 :: htpc.updater :: INFO :: Using GitUpdater engine
2022-09-26 22:02:04 :: apscheduler.scheduler :: INFO :: Added job "Updater.update_needed" to job store "default"
2022-09-26 22:02:04 :: modules.kodi :: WARNING :: No configured kodi-Servers.
2022-09-26 22:02:04 :: modules.newznab :: WARNING :: No configured Indexers.
Traceback (most recent call last):
  File "C:\HTPC-Manager3\modules\stats.py", line 26, in admin
    is_admin = os.getuid() == 0
AttributeError: module 'os' has no attribute 'getuid'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "htpc.py", line 254, in <module>
    main()
  File "htpc.py", line 245, in main
    load_modules()
  File "htpc.py", line 82, in load_modules
    from modules.stats import Stats
  File "C:\HTPC-Manager3\modules\stats.py", line 65, in <module>
    if admin() is False:
  File "C:\HTPC-Manager3\modules\stats.py", line 28, in admin
    is_admin = ctypes.windll.shell32.IsUserAnAdmin() != 0
NameError: name 'ctypes' is not defined

Close your issue when it's solved! If you found the solution yourself please comment so that others benefit from it.

@MichaIng MichaIng added bug Something isn't working module:stats labels Sep 27, 2022
@MichaIng
Copy link
Member

Many thanks for your report. On Windows we use a module which is not imported. Can you try to replace the stats.py with this one: #59

@MichaIng MichaIng linked a pull request Sep 27, 2022 that will close this issue
@phairplay
Copy link
Author

Hi, many thanks yes that has resolved the issue of it starting up.
I have come across another I would like help with, but will raise another ticket

thank you for your help
I current run HTPC on python 2 and really want to move over to python3 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working module:stats
Development

Successfully merging a pull request may close this issue.

2 participants