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

missing package init files #22

Open
DmitrySandalov opened this issue Oct 31, 2016 · 1 comment
Open

missing package init files #22

DmitrySandalov opened this issue Oct 31, 2016 · 1 comment

Comments

@DmitrySandalov
Copy link

tvcmd installs incorrectly with setup.py

Steps:

  1. mkvirtualenv -p python3 tvcmd
  2. git clone https://github.com/juantascon/tvcmd/; cd tvcmd
  3. ./setup.py install > /dev/null
package init file 'tvcmd/lib/__init__.py' not found (or not a regular file)
package init file 'tvcmd/sources/__init__.py' not found (or not a regular file)
zip_safe flag not set; analyzing archive contents...

When I try to launch tvcmd after such install:

Traceback (most recent call last):
  File "/home/user/.virtualenvs/tvcmd/bin/tvcmd", line 4, in <module>
    __import__('pkg_resources').run_script('tvcmd==1.2.1', 'tvcmd')
  File "/home/user/.virtualenvs/tvcmd/lib/python3.5/site-packages/pkg_resources/__init__.py", line 742, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/home/user/.virtualenvs/tvcmd/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1504, in run_script
    exec(script_code, namespace, namespace)
  File "/home/user/.virtualenvs/tvcmd/lib/python3.5/site-packages/tvcmd-1.2.1-py3.5.egg/EGG-INFO/scripts/tvcmd", line 72, in <module>
  File "/home/user/.virtualenvs/tvcmd/lib/python3.5/site-packages/tvcmd-1.2.1-py3.5.egg/EGG-INFO/scripts/tvcmd", line 28, in main
  File "/home/user/.virtualenvs/tvcmd/lib/python3.5/site-packages/tvcmd-1.2.1-py3.5.egg/tvcmd/shell.py", line 2, in <module>
  File "/home/user/.virtualenvs/tvcmd/lib/python3.5/site-packages/tvcmd-1.2.1-py3.5.egg/tvcmd/commands.py", line 2, in <module>
  File "/home/user/.virtualenvs/tvcmd/lib/python3.5/site-packages/tvcmd-1.2.1-py3.5.egg/tvcmd/manager.py", line 2, in <module>
ImportError: No module named 'tvcmd.sources'

When I create the blank missing files

touch tvcmd/lib/__init__.py
touch tvcmd/sources/__init__.py

and launch ./setup.py install again, tvcmd is working properly.

@DmitrySandalov
Copy link
Author

BTW install with pip is working fine:
pip install https://github.com/juantascon/tvcmd/archive/master.zip

It would be good to add install instructions to README.md

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

1 participant