elsampsa / valkka-live

OpenSource Video Surveillance Program
GNU Affero General Public License v3.0
31 stars 12 forks source link

Add valkka.live.discovery to setup.py #10

Closed NeverOddOrEven closed 4 years ago

NeverOddOrEven commented 4 years ago

While trying to install and run valkka-live according to the instructions on the website, I ran into an issue with a missing valkka.live.discovery module. I think a similar problem exists in valkka-core based on some previous debugging I've done.

neveroddoreven:~$ valkka-live
Traceback (most recent call last):
  File "/home/neveroddoreven/.local/bin/run-valkka-live", line 33, in <module>
    sys.exit(load_entry_point('valkka-live==0.13.0', 'console_scripts', 'run-valkka-live')())
  File "/home/neveroddoreven/.local/lib/python3.6/site-packages/valkka/live/main.py", line 112, in main
    from valkka.live.gui import MyGui as MyGuiBase
  File "/home/neveroddoreven/.local/lib/python3.6/site-packages/valkka/live/gui.py", line 64, in <module>
    from valkka.live import style, container, tools, constant
  File "/home/neveroddoreven/.local/lib/python3.6/site-packages/valkka/live/container/__init__.py", line 3, in <module>
    from .video import *
  File "/home/neveroddoreven/.local/lib/python3.6/site-packages/valkka/live/container/video.py", line 32, in <module>
    from valkka.live.filterchain import FilterChainGroup
  File "/home/neveroddoreven/.local/lib/python3.6/site-packages/valkka/live/filterchain.py", line 34, in <module>
    from valkka.live.datamodel.base import DataModel
  File "/home/neveroddoreven/.local/lib/python3.6/site-packages/valkka/live/datamodel/base.py", line 31, in <module>
    from valkka.live.form import SlotFormSet
  File "/home/neveroddoreven/.local/lib/python3.6/site-packages/valkka/live/form.py", line 30, in <module>
    from valkka.live.discovery.widget import DiscoveryWidget
ModuleNotFoundError: No module named 'valkka.live.discovery

I am using the system installed Python and Ubuntu 18.04 python3-numpy package:

neveroddoreven:~$ which python3
/usr/bin/python3
neveroddoreven:~$ python3 -c "import numpy; print(numpy.__version__);"
1.13.3

Python is not my strongest language, so if this needs tweaks or if I didn't make the change in the right place just let me know. I can adjust the PR if needed.

elsampsa commented 4 years ago

One more comment. This is a typical bug a developer (me) gets when installing the package with "pip3 install --user -e .", since that way you don't notice the missing packages in the list..! I also need to test by creating an actual python package (just a reminder for myself).