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

fix import __init__.py #2

Closed
wants to merge 1 commit into from

Conversation

SeRj-ThuramS
Copy link

fix import error

Traceback (most recent call last):
File "/usr/local/bin/tufw", line 5, in
from tufw.init import main
File "/usr/local/lib/python3.10/dist-packages/tufw/init.py", line 7, in
from firewall import *
ModuleNotFoundError: No module named 'firewall'

fix import error

Traceback (most recent call last):
  File "/usr/local/bin/tufw", line 5, in <module>
    from tufw.__init__ import main
  File "/usr/local/lib/python3.10/dist-packages/tufw/__init__.py", line 7, in <module>
    from firewall import *
ModuleNotFoundError: No module named 'firewall'
Copy link
Owner

@a13ssandr0 a13ssandr0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the submission.
Code is working now.
Before merging I suggested to change the import of tufw.firewall to a relative one, I tested it with the module installed with pip and works.

src/tufw/__init__.py Show resolved Hide resolved
@SeRj-ThuramS
Copy link
Author

SeRj-ThuramS commented May 10, 2024 via email

@a13ssandr0
Copy link
Owner

@SeRj-ThuramS @phanirithvij I changed the import to try both import methods when running as a pip module and when installed as a standalone program.
Hope it works for all now.

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.

3 participants