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

06/10/2024 - 18:20:11 | ERROR | You must be root to use this library on linux. #39

Open
PhoenixtheII opened this issue Oct 6, 2024 · 9 comments
Assignees
Labels
bug Something isn't working v2.1.X v2.1.0

Comments

@PhoenixtheII
Copy link

How about, why?

And fix this to user-land please?

@greg-ynx
Copy link
Owner

greg-ynx commented Oct 6, 2024

Hello,

Sorry, NexusDownloadFlow does not officially support Linux at this time.
I created this application for use on Windows and have never considered using it on other OS.

Nevertheless, your error is generic and comes from a Python library, so I'd need the full stacktrace to be able to tell you if I can fix this bug.

Please provide your complete log file.

@greg-ynx greg-ynx self-assigned this Oct 6, 2024
@greg-ynx greg-ynx added v2.1.X v2.1.0 bug Something isn't working labels Oct 6, 2024
@PhoenixtheII
Copy link
Author

PhoenixtheII commented Oct 6, 2024

Maybe instread of using 'keyboard' use 'https://pypi.org/project/pynput/' as it doesn't require root priveleges

@PhoenixtheII
Copy link
Author

Maybe instread of using 'keyboard' use 'https://pypi.org/project/pynput/' as it doesn't require root priveleges

Was suggested from: https://stackoverflow.com/questions/48796147/import-error-you-must-be-root

@PhoenixtheII
Copy link
Author

PhoenixtheII commented Oct 6, 2024

(venv) [user@pc NexusDownloadFlow]$ python main.py 

 _   _
| \ | |
|  \| | _____  ___   _ ___
| . ` |/ _ \ \/ / | | / __|
| |\  |  __/>  <| |_| \__ \
\_| \_/\___/_/\_\__,_|___/
______                    _                 _  ______ _
|  _  \                  | |               | | |  ___| |
| | | |_____      ___ __ | | ___   __ _  __| | | |_  | | _____      __
| | | / _ \ \ /\ / / '_ \| |/ _ \ / _` |/ _` | |  _| | |/ _ \ \ /\ / /
| |/ / (_) \ V  V /| | | | | (_) | (_| | (_| | | |   | | (_) \ V  V /
|___/ \___/ \_/\_/ |_| |_|_|\___/ \__,_|\__,_| \_|   |_|\___/ \_/\_/v2.1.0
06/10/2024 - 18:32:59 | INFO | NexusDownloadFlow is starting...
06/10/2024 - 18:32:59 | INFO | NexusDownloadFlow is running in classic mode.
06/10/2024 - 18:32:59 | ERROR | You must be root to use this library on linux.
06/10/2024 - 18:32:59 | CRITICAL | Please report this exception to our repository on GitHub: https://github.com/greg-ynx/NexusDownloadFlow/issues?q=is%3Aissue+is%3Aopen
You can use the issue command in order to fill our template.
06/10/2024 - 18:32:59 | WARNING | The screenshot does not exist.
06/10/2024 - 18:32:59 | INFO | Program ended.
Press any key to exit...

Here's the log...

@greg-ynx
Copy link
Owner

greg-ynx commented Oct 6, 2024

Yeah you're better than my logging system and found the library that throws this error.

May I ask, how are you running NDF on linux?

If you're using the Python project then I will ask you to delete:

  • The __init_hotkeys function definition at scripts/cli/run/run.py, line 212 to 215.
  • The __init_hotkeys function call at scripts/cli/run/run.py, line 144
  • The keyboard lib import at scripts/cli/run/run.py, line 9

And try to run NDF.

You wont be able to use those hotkeys afterwards but your issue will be solved. This is the only workaround I can give you at the moment, as I'm working on another project that will take up all my personal time. I'm not going to go ahead with a new version of NDF at the moment.

I'll still create a ticket to solve your problem. I'll close that one once the merge and release are done.

@PhoenixtheII
Copy link
Author

I git cloned this project, pip install -r requirements, and then just ran main.py.

Figured that would do for a python project to run it casually :D

^, I'll try that later, seems easy enough to remove the dependency on keyboard it seems.

Finding messages thrown is sometimes pretty easy:

venv) [user@pc NexusDownloadFlow]$ find -name "*.py" -exec grep -Hin "You must be root" {} \; ./venv/lib/python3.12/site-packages/keyboard/_nixcommon.py:174: raise ImportError('You must be root to use this library on linux.')

@PhoenixtheII
Copy link
Author

#41

Did some work... I'm not a python devvie myself, so this is slapped together real quick.

In the end this wasn't what I was looking for....

I needed a Nexus Collection Downloader on linux, not a "click download link" thingie xD

@greg-ynx
Copy link
Owner

greg-ynx commented Oct 6, 2024

Thanks for the work! I can see that more than one library was incompatible with linux...

Too bad NDF isn't what you were looking for, but it does what it said it does on the readme 😅

@PhoenixtheII
Copy link
Author

PhoenixtheII commented Oct 7, 2024

but it does what it said it does on the readme

It does, it does, and that was my expectation bad.

"Oh a nexus download thingie... in python, wait, that can run on linux then too... must.. try... this"

And so here we are xD, anyways, had some good fun poking into getting it to work. lmao.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.1.X v2.1.0
Projects
None yet
Development

No branches or pull requests

2 participants