instamatic-dev / instamatic

Python program for automated electron diffraction data collection
https://instamatic.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
57 stars 25 forks source link

Add empty __init__.py to server module #13

Closed PaulVanSchayck closed 4 years ago

PaulVanSchayck commented 4 years ago

After running python setup.py install and then running instamatic I got the following error:

Traceback (most recent call last):
  File "S:\instamatic-1.1.0dev\python36\Scripts\instamatic.temserver-script.py", line 11, in <module>
    load_entry_point('instamatic==1.1.0.dev0', 'console_scripts', 'instamatic.temserver')()
  File "S:\instamatic-1.1.0dev\python36\lib\site-packages\pkg_resources\__init__.py", line 565, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "S:\instamatic-1.1.0dev\python36\lib\site-packages\pkg_resources\__init__.py", line 2631, in load_entry_point
    return ep.load()
  File "S:\instamatic-1.1.0dev\python36\lib\site-packages\pkg_resources\__init__.py", line 2291, in load
    return self.resolve()
  File "S:\instamatic-1.1.0dev\python36\lib\site-packages\pkg_resources\__init__.py", line 2297, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
ModuleNotFoundError: No module named 'instamatic.server'

I believe this is due to the server module not having an __init__.py so it's not copied during the install phase to site-packages. I could manually resolve this by copying the server module from the source directory to S:\instamatic-1.1.0dev\python36\Lib\site-packages\instamatic-1.1.0.dev0-py3.6.egg\instamatic.

stefsmeets commented 4 years ago

Thanks for that @PaulVanSchayck !