-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
file read issue on Windows #18
Comments
Thanks for reporting this. I will investigate. |
@dyf I made a first attempt at a fix in the mmap-windows branch. Unfortunately this was a 'blind' fix: I do not have access to a windows machine at the moment to be able to properly test it. If someone in the meantime is able to test this on a windows machine: let me know the results. |
Thanks, getting closer. I'm able to read the downloaded file with open(...), but get the following error with your updated pynrrd: C:\Users\davidf\Anaconda\lib\site-packages\allensdk\core\mouse_connectivity_cache.pyc in get_projection_density(self, experiment_id, file_name) C:\Users\davidf\Anaconda\lib\site-packages\nrrd.pyc in read(filename) C:\Users\davidf\Anaconda\lib\site-packages\nrrd.pyc in read_data(fields, filehandle, filename, seek_past_header) WindowsError: [Error 5] Access is denied |
I'm still doing this 'blind', but I've made slight modification in the same branch. It could be that the code I initially created to fix this requested write access to the file. Perhaps this fixes the issue. |
Looks like it's working now. Thanks for the quick turnaround! |
The recent merge from nocnokneo seems to have reintroduced a Windows file reading bug. Here's the error:
C:\Anaconda\python.exe C:/Users/user/PycharmProjects/MyFirstAllenBrain/Test.py
Traceback (most recent call last):
File "C:/Users/user/PycharmProjects/MyFirstAllenBrain/Test.py", line 14, in
pd = mcc.get_projection_density(experiments[0]['id'])
File "C:\Users\user\AppData\Roaming\Python\Python27\site-packages\allensdk\core\mouse_connectivity_cache.py", line 170, in get_projection_density
return nrrd.read(file_name)
File "C:\Anaconda\lib\site-packages\nrrd.py", line 384, in read
data = read_data(header, filehandle, filename)
File "C:\Anaconda\lib\site-packages\nrrd.py", line 235, in read_data
mmap.MAP_PRIVATE, mmap.PROT_READ)
AttributeError: 'module' object has no attribute 'MAP_PRIVATE'
Process finished with exit code 1
I believe MAP_PRIVATE is a linux-specific attribute, but I'm not sure about this.
Related stackoverflow question: http://stackoverflow.com/questions/32261480/allen-brain-institute-mouse-connectivity-api-and-mouse-connectivity-cache-exam/32279226#32279226
The text was updated successfully, but these errors were encountered: