Skip to content
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

Can't record video stacks in camera module #155

Open
campagnola opened this issue Sep 21, 2023 · 3 comments
Open

Can't record video stacks in camera module #155

campagnola opened this issue Sep 21, 2023 · 3 comments
Assignees
Labels

Comments

@campagnola
Copy link
Contributor

campagnola commented Sep 21, 2023

Clicking the "record stack" button in camera module results in the following:

Traceback (most recent call last):
  File "C:\Users\lukec\acq4\acq4\util\imaging\record_thread.py", line 133, in run
    self.handleFrames(newFrames)
  File "C:\Users\lukec\acq4\acq4\util\imaging\record_thread.py", line 191, in handleFrames
    self.writeFrames(recFrames, dh)
  File "C:\Users\lukec\acq4\acq4\util\imaging\record_thread.py", line 211, in writeFrames
    self.currentStack = dh.writeFile(data, 'video', autoIncrement=True, info=frames[0][1], appendAxis='Time', appendKeys=['translation'])
  File "C:\Users\lukec\acq4\acq4\util\DataManager.py", line 746, in writeFile
    fileName = fileClass.write(obj, self, fileName, **kwargs)
  File "C:\Users\lukec\acq4\acq4\filetypes\MetaArray.py", line 41, in write
    data.write(os.path.join(dirHandle.name(), fileName), **args)
  File "C:\Users\lukec\Miniconda3\envs\acq4\lib\site-packages\MetaArray\__init__.py", line 943, in write
    return self.writeMa(fileName, **opts)
TypeError: writeMa() got an unexpected keyword argument 'appendKeys'
@outofculture outofculture self-assigned this Sep 26, 2023
@outofculture
Copy link
Collaborator

appendKeys is not supported by the old .ma format MetaArray files. pip install h5py to use the newer format.

@campagnola
Copy link
Contributor Author

Turned out that the hdf5 package was broken, but this error was silently hidden. Better to require hdf5 by default and allow writing old-mode only by explicit request.

@campagnola campagnola added the bug label Sep 26, 2023
@outofculture
Copy link
Collaborator

Hmm. That would break existing code that depends on MetaArray, but I can start the deprecation cycle on MetaArray now. We can also just make the requirement explicit and early in ACQ4's startup. I'll do that, too.

@outofculture outofculture reopened this Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants