cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
313 stars 157 forks source link

PermissionError with Windows 7 #1079

Closed Ashkees closed 3 years ago

Ashkees commented 3 years ago

Hello,

First of all, thanks for the wonderful software. I have been using Phy2 successfully on two Windows 10 computers. Now I'm trying to get it to work on an older computer that is still running Windows 7.

It looks like my issue is similar to this one: https://github.com/cortex-lab/phy/issues/865

I'm running Python 3.6 and Phy 2.0b2.dev0

when I use the command

cd Path\To\My\Data\ activate circus phy template-gui params.py

I receive the error:

(circus) PS D:\Mariela\Mulle\projectCatherine\clustering\2021_Dreadd_awakeDGsp CA3lfp\2021-01-12\amplifier_0\amplifier_0.GUI> phy template-gui params.py 17:08:04.301 [W] model:613 Unreferenced clusters found in spike_clust ers (generally not a problem) 17:08:04.406 [W] model:655 Skipping spike waveforms that do not exist , they will be extracted on the fly from the raw data as needed. 17:08:04.413 [E] init:62 An error has occurred (PermissionError): [ WinError 32] The process cannot access the file because it is being used by anot her process: 'D:\Mariela\Mulle\projectCatherine\clustering\2021_Dreadd_awak e_DGsp_CA3lfp\2021-01-12\amplifier_0.dat' Traceback (most recent call last): File "c:\users\compadmin\anaconda3\lib\runpy.py", line 194, in _run_moduleas main return _run_code(code, main_globals, None, File "c:\users\compadmin\anaconda3\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\CompAdmin\anaconda3\Scripts\phy.exe__main.py", line 7, in <m odule> sys.exit(phycli()) File "c:\users\compadmin\anaconda3\lib\site-packages\click\core.py", line 829, in call return self.main(args, kwargs) File "c:\users\compadmin\anaconda3\lib\site-packages\click\core.py", line 782, in main rv = self.invoke(ctx) File "c:\users\compadmin\anaconda3\lib\site-packages\click\core.py", line 1259 , in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "c:\users\compadmin\anaconda3\lib\site-packages\click\core.py", line 1066 , in invoke return ctx.invoke(self.callback, ctx.params) File "c:\users\compadmin\anaconda3\lib\site-packages\click\core.py", line 610, in invoke return callback(args, *kwargs) File "c:\users\compadmin\anaconda3\lib\site-packages\click\decorators.py", lin e 21, in new_func return f(get_current_context(), args, kwargs) File "c:\users\compadmin\anaconda3\lib\site-packages\phy\apps__init__.py", li ne 159, in cli_template_gui template_gui(params_path, kwargs) File "c:\users\compadmin\anaconda3\lib\site-packages\phy\apps\template\gui.py" , line 209, in template_gui model = load_model(params_path) File "c:\users\compadmin\anaconda3\lib\site-packages\phylib\io\model.py", line 1319, in load_model return TemplateModel(**get_template_params(params_path)) File "c:\users\compadmin\anaconda3\lib\site-packages\phylib\io\model.py", line 339, in init self._load_data() File "c:\users\compadmin\anaconda3\lib\site-packages\phylib\io\model.py", line 437, in _load_data self.traces = self._load_traces(self.channel_mapping) File "c:\users\compadmin\anaconda3\lib\site-packages\phylib\io\model.py", line 568, in _load_traces traces = get_ephys_reader( File "c:\users\compadmin\anaconda3\lib\site-packages\phylib\io\traces.py", lin e 494, in get_ephys_reader return klass(arg, **kwargs) File "c:\users\compadmin\anaconda3\lib\site-packages\phylib\io\traces.py", lin e 314, in init self._mmaps = [ File "c:\users\compadmin\anaconda3\lib\site-packages\phylib\io\traces.py", lin e 315, in _memmap_flat(path, dtype=dtype, n_channels=n_channels, offset=offset) File "c:\users\compadmin\anaconda3\lib\site-packages\phylib\io\traces.py", lin e 163, in _memmap_flat return np.memmap(path, dtype=dtype, offset=offset, shape=shape) File "c:\users\compadmin\anaconda3\lib\site-packages\numpy\core\memmap.py", li ne 275, in new__ self.filename = filename.resolve() File "c:\users\compadmin\anaconda3\lib\pathlib.py", line 1177, in resolve s = self._flavour.resolve(self, strict=strict) File "c:\users\compadmin\anaconda3\lib\pathlib.py", line 205, in resolve s = self._ext_to_normal(_getfinalpathname(s)) PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\Mariela\Mulle\projectCatherine\clustering \2021_Dreadd_awake_DGsp_CA3lfp\2021-01-12\amplifier_0.dat'

QWidget: Must construct a QApplication before a QWidget

I tried debugging with Pierre Yger (I was previously having issues with SpyKING Circus, which he solved), but he was stumped with this issue.

As a side note, we are looking into installing Windows 10 on this computer; if we are allowed to do this maybe it will solve our problems.

Thanks in advance for your help. Ashley

Ashkees commented 3 years ago

Amendment: We installed Windows 10 and it is working fine now, so I will close this thread