First of all, thanks for making this package. I enjoy reading about it and think it's very good.
Now, let me tell you what I found out using the python neo package.
I am working on a project for optical electrophysiology and want to combine that with normal electrophysiology. For combining that, I want to import .abf files. Searching for a package that can import these files, I found the neo project. In the end, the only lines in my project that use neo are:
from neo.io import AxonIO
abf_reader = AxonIO(filepath)
abf_seg = abf_reader.read_segment()
data = np.array([d[0] for d in abf_seg.analogsignals[0].rescale('mV').magnitude])
These lines worked perfectly when I tested everything running it with the python enviroment. But once I created an executable using pyinstaller, and executed this executable, the line after the import fails. This is the error:
Traceback (most recent call list):
File "foo\bar.py", line ..., in ...
File "site-packages\neo\io\axonio.py", line 45, in __init__
File "site-packages\neo\io\basefromrawio.py", line 73, in __init__
File "site-packages\neo\rawio\baserawio.py", line 152, in parse_header
File "site-packages\neo\rawio\baserawio.py", line 382, in _group_signal_channel_characteristics
ModuleNotFoundError: No module named 'numpy.lib.recfunctions'
I do not understand why that error occurs. I checked in the neo source code and did not find any occurence of numpy.lib.recfunctions.
In the end, I fixed the error with a, in my opinion, not so nice workaround: I just added
import numpy.lib.recfunctions
in my code somewhere.
I do not know if this is a bug regarding pyinstaller, neo, or maybe just a strange interaction between these two. But I wanted to share my experience and give a workaround. Maybe, one should add the line I added somewhere in the neo code to avoid that kind of bug for other people.