Closed JuliaSprenger closed 2 months ago
That is True. We have not see this, thank you. Andrea Maia have send a PR now NeuroroshareIO ahev two side : NeuroshareapiIO or NeurosharectypesIO. I think the python-neo/neo/test/iotest/test_neuroshareio.py have not been modified still deal with NeurosharectypesIO only. I will try to change this but I was unlucky with installing pyneuroshare.
Could you test this naive fix ?
This fix is a good start, but there is still the second issue I described above, which results in an error when executing test_neuroshareio with neuroshareio installed: neuroshareapiio breaks in line 40 and 260, because this version of the many_to_one_relationship does not exist any more.
In addition I noticed that even when not having neuroshare installed the test_neuroshareio is not successful on my computer:
Error Traceback File .../python/python-neo/neo/test/iotest/test_neuroshareio.py", line 76, in test_with_multichannel blocks = reader.read() File ".../python/python-neo/neo/io/baseio.py", line 121, in read seg = self.read_segment(lazy=lazy, cascade=cascade, **kargs) File ".../python/python-neo/neo/io/neurosharectypesio.py", line 164, in read_segment neuroshare.ns_OpenFile(ctypes.c_char_p(self.filename) ,ctypes.byref(hFile)) File ".../python/python-neo/neo/io/neurosharectypesio.py", line 68, in func_with_error raise NeuroshareError(self.lib, errno) NeuroshareError: -2:
I have push a new patch. I am very unlucky installing neuroshare. So can't test the patch. Could you test ?
The create_many_to_one relationship error is fixed by your last commit.
I still observe another error when running the test, which could be related to the operating system and the neuroshare version I am using (ubuntu 15.04, neuroshare version 0.9.2).
The error occurs in neuroshare itself, as it is unable to locate the 'nsMCDLibrary', which is downloaded when running the test_neuroshareio and saved in '/tmp/nsMCDLibrary/nsMCDLibrary.so'. The neuroshare library (neuroshare/library.py, line 32-57) however only considers following locations when scanning for .so files:
and system paths (sys.path):
Therefore the 'nsMCDLibrary.so' file is not found and the test_neuroshare results in an error.
I try a new thing. I am unlucky with neuroshare on my PC. It complains with errors 2. Could you check the new patch ?
Running the test_neuroshareio.py now results in following error:
File ".../neo/test/iotest/test_neuroshareio.py", line 74, in test_with_multichannel reader = NeuroshareIO(filename0, self.dllname) File ".../neo/io/neuroshareapiio.py", line 114, in init self.fd = ns.File(self.filename, library = library) File "/usr/lib/python2.7/dist-packages/neuroshare/File.py", line 41, in init (handle, info) = self._lib._open_file(filename) File "/usr/lib/python2.7/dist-packages/neuroshare/Library.py", line 116, in _open_file (fh, file_info) = _capi.open_file(self._handle, filename) error: Neuroshare-Error (-2):
I checked the filename to be loaded, which is '/tmp/files_for_testing_neo/neuroshareap/Multichannel_fil_1.mcd'. This file exists. I don't know what is going wrong here.
We don't see errors in the current ci and neuroshare according to an end-user isn't being super well maintained currently. I will close this, but if something comes up we can reopen.
When having neuroshare installed (therefore using neo.io.neuroshareapiio as neuroshareio) the test_neuroshareio.py results in an error:
"...python-neo/neo/test/iotest/test_neuroshareio.py", line 70, in test_with_multichannel reader = NeuroshareIO(filename = filename0, dllname = self.dllname) TypeError: init() got an unexpected keyword argument 'dllname'
In addition neuroshareapiio is using a broken version of create_many_to_one_relationship handling: Line 40: from neo.io.tools import create_many_to_one_relationship Line 260: create_many_to_one_relationship(seg)