instamatic-dev / instamatic

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

Missing weights-py3.p file #67

Closed GearoidM closed 1 year ago

GearoidM commented 1 year ago

I don't think this was posted before, but the weights-py3.p file was missing when I pip installed Instamatic. This prevents data acquisition: on attempting to collect data, the following error is returned:

Traceback (most recent call last): File "c:\python36\lib\site-packages\instamatic\gui\gui.py", line 71, in run func(self, kwargs) File "c:\python36\lib\site-packages\instamatic\gui\red_frame.py", line 110, in acquire_data_RED from instamatic.experiments import RED File "c:\python36\lib\site-packages\instamatic\experiments__init.py", line 1, in from .autocred import experiment as autocRED File "c:\python36\lib\site-packages\instamatic\experiments\autocred\experiment.py", line 29, in from instamatic.neural_network import predict, preprocess File "c:\python36\lib\site-packages\instamatic\neural_network__init__.py", line 1, in from .neural_network import predict File "c:\python36\lib\site-packages\instamatic\neural_network\neural_network.py", line 6, in with open(Path(file__).parent / 'weights-py3.p', 'rb') as p_file: FileNotFoundError: [Errno 2] No such file or directory: 'c:\python36\lib\site-packages\instamatic\neural_network\weights-py3.p'**

Not sure why this file is not downloaded with the package but it can be found here. So, a simple fix is to download the weights-py3.p file and put it in the appropriate folder.

stefsmeets commented 1 year ago

Thanks, apparently this only shows up in the distribution from pypi, and not when installing the package locally. Turns out this was because of a typo in manifest.in.

Fixed by https://github.com/instamatic-dev/instamatic/commit/a0fdbca20da44e82c4a75edb706cb6050fe80810