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

TypeError: 'module' object is not callable #7

Closed
trjh opened this issue Mar 7, 2022 · 3 comments
Closed

TypeError: 'module' object is not callable #7

trjh opened this issue Mar 7, 2022 · 3 comments

Comments

@trjh
Copy link

trjh commented Mar 7, 2022

Hi folks, I will probably figure this out at some point, but I need some help with getting the code to run.

I cloned the repo on an Ubuntu 20.04 system, then installed livefs-editor with sudo pip3 install ./livefs-editor, and then tried to run it, but I'm getting this error:

% livefs-edit
Traceback (most recent call last):
  File "/usr/local/bin/livefs-edit", line 9, in <module>
    sys.exit(__main__())
TypeError: 'module' object is not callable

As far as I've been able to figure out this may be a pip version issue.

ubuntux86(livefs-editor)> python3 --version
Python 3.8.10
ubuntux86(livefs-editor)> pip3 --version
pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

Any assistance would be greatly appreciated! Thank you.

@trjh
Copy link
Author

trjh commented Mar 8, 2022

Update -- I have it working, but this is most definitely a hack:

python3 -m venv .env
.env/bin/python -m pip install pyyaml==5.4.1
.env/bin/python -m pip install ./livefs-editor
vim .env/bin/livefs-edit

The change I have to make to the binary

8c8,13
<     sys.exit(main())
---
>     sys.exit(__main__.main(sys.argv[1:]))

@mwhudson
Copy link
Owner

Odd, I'm sure this worked at some point. Fixed anyway, although possibly not in the cleanest way. (I mostly invoke this as python3 -m livefs_edit fwiw)

@trjh
Copy link
Author

trjh commented Mar 18, 2022

Thank you! I'm embarrassed to admit I didn't know you could invoke modules that way.

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

No branches or pull requests

2 participants