Skip to content

Fix ImportError: cannot import name 'main' when binaries are invoked by /usr/bin #339

Open
D3vil0p3r wants to merge 2 commits intosecynic:masterfrom
D3vil0p3r:patch-1
Open

Fix ImportError: cannot import name 'main' when binaries are invoked by /usr/bin #339
D3vil0p3r wants to merge 2 commits intosecynic:masterfrom
D3vil0p3r:patch-1

Conversation

@D3vil0p3r
Copy link

When ipwhois install the CLI scripts in /usr/bin directory, when invoked, they produce the following error:

Traceback (most recent call last):
  File "/usr/bin/ipwhois_cli", line 5, in <module>
    from ipwhois.scripts.ipwhois_cli import main
ImportError: cannot import name 'main' from 'ipwhois.scripts.ipwhois_cli' (/usr/lib/python3.13/site-packages/ipwhois/scripts/ipwhois_cli.py)

It occurs because the original py scripts lack of main function.

This PR fixes the mentioned error.

@D3vil0p3r
Copy link
Author

@secynic can you merge this PR and publish a minor release on GitHub and PyPI?

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.

1 participant