cortex-lab / cortex-lab/phy

Missing files in cache folders when using phy on different computer

Open
#1,191 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: data status: needs-info type: bug
Dominant language
Python
Stars
430
Forks
187
Avg merge
2h 31m
Merged PRs (30d)
2

Description

Hi

I'm trying to run phy on a computer (windows) different from the one used for kilosort (KS2, ubuntu). I've copied the directory with Kilosort outputs, as well as the data.dat file on this new computer.

Launching phy works fine, and I'm able to curate and save data normally. However, this error shows up in the command line when I close phy (and an error window pops up too):
[E] init:62 An error has occurred (FileNotFoundError): [Errno 2] No such file or directory: '\\PATH\.phy\memcache\phy.apps.base.get_mean_spike_template_amplitudes.pkl'
Traceback (most recent call last):
File "\anaconda3\lib\site-packages\phy\gui\gui.py", line 590, in closeEvent
res = emit('close', self)
File "\anaconda3\lib\site-packages\phylib\utils\event.py", line 141, in emit
res.append(f(sender, *args, **kwargs))
File "\anaconda3\lib\site-packages\phy\apps\base.py", line 1750, in on_close
self.context.save_memcache()
File "\anaconda3\lib\site-packages\phy\utils\context.py", line 139, in save_memcache
with open(str(path), 'wb') as fd:
FileNotFoundError: [Errno 2] No such file or directory: '\\PATH\.phy\memcache\phy.apps.base.get_mean_spike_template_amplitudes.pkl'

First, is that a problem regarding saved data?
Second, why does that happen and is it fixable?

Thanks
Guilhem

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with phy/utils/context.py at save_memcache() and phy/apps/base.py at on_close(), then reproduce the Windows workflow using copied Kilosort outputs and data.dat. Check whether closing phy raises the reported FileNotFoundError and whether saved curation data remains intact; done means the close operation completes without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.