You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
when i install a fork i made using this command: pipx install git+https://github.com/111100001/tubeup.git
it installs it fine, but when i try to use it, is says this:
tubeup
Traceback (most recent call last):
File "/home/lucky/.local/bin/tubeup", line 8, in <module>
sys.exit(__main__())
TypeError: 'module' object is not callable
then i found out the file in .local/bin/tubeup is different than the one that is made when the main tubeup is installed normally.
the .local/bin file that pipx made using pipx install git+https://github.com/111100001/tubeup.git :
#!/home/lucky/.local/pipx/venvs/tubeup/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from tubeup import __main__
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(__main__())
the .local/bin file that is made when i install the main tubeup branch using pipx install tubeup :
#!/home/lucky/.local/pipx/venvs/tubeup/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from tubeup.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
i copied the main tubeup bin file and pasted it in the fork version that i installed and it worked.
How to reproduce
install my fork using pipx install git+https://github.com/111100001/tubeup.git
type tubeup in the terminal
the error will show up
to fix: change the .local/bin/tubeup file to this file (this is the file that is made with pipx install tubeup :
#!/home/lucky/.local/pipx/venvs/tubeup/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from tubeup.__main__ import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())
Expected behavior
tuebup wokrs normally when installed from source control
The text was updated successfully, but these errors were encountered:
It seems the scripts definition in the pyproject.toml is the culprit here. This error happens as well, wenn you install tubeup from the main repo.
I fixed it by changing the scripts from:
[project.scripts]
tubeup = "tubeup:__main__"
to
[project.scripts]
tubeup = "tubeup.__main__:main"
For reference, see my fork and try installing from there.
Looks like setup.py somehow makes the scripts path work when building the package, but installing directly from source, the first version does not work. Mind that this is not pipx functionality (we have nothing to do with the creation of the .../bin/python files). This is handled by pip itself.
Describe the bug
when i install a fork i made using this command:
pipx install git+https://github.com/111100001/tubeup.git
it installs it fine, but when i try to use it, is says this:
tubeup
then i found out the file in .local/bin/tubeup is different than the one that is made when the main tubeup is installed normally.
the .local/bin file that pipx made using
pipx install git+https://github.com/111100001/tubeup.git
:the .local/bin file that is made when i install the main tubeup branch using
pipx install tubeup
:i copied the main tubeup bin file and pasted it in the fork version that i installed and it worked.
How to reproduce
pipx install git+https://github.com/111100001/tubeup.git
pipx install tubeup
:Expected behavior
tuebup wokrs normally when installed from source control
The text was updated successfully, but these errors were encountered: