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

Create __init__.py #116

Merged
merged 1 commit into from
Feb 12, 2024
Merged

Create __init__.py #116

merged 1 commit into from
Feb 12, 2024

Conversation

Mte90
Copy link
Contributor

@Mte90 Mte90 commented Feb 12, 2024

Avoid this crash if the python script is executed:

Traceback (most recent call last):
  File "/home/mte90/Desktop/kde/goldwarden/gui/goldwarden_ui_main.py", line 2, in <module>
    import src.linux.main as linux_main
ModuleNotFoundError: No module named 'src.linux'

Avoid this crash if the python script is executed:
```
Traceback (most recent call last):
  File "/home/mte90/Desktop/kde/goldwarden/gui/goldwarden_ui_main.py", line 2, in <module>
    import src.linux.main as linux_main
ModuleNotFoundError: No module named 'src.linux'
```
@quexten
Copy link
Owner

quexten commented Feb 12, 2024

Hmm, when running python3 goldwarden_ui_main.py from the gui directory or python3 gui/goldwarden_ui_main.py from the goldwarden directory, I don't get this error. I'm happy to merge this, though how did you run it for the error to occur?

@Mte90
Copy link
Contributor Author

Mte90 commented Feb 12, 2024

I get that from the parent folder of the project, that files let python knows that the folder is a module folder so can load them.

@quexten
Copy link
Owner

quexten commented Feb 12, 2024

Thanks for clarifying and for the PR.

@quexten quexten merged commit 87e1309 into quexten:main Feb 12, 2024
9 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants