Saving to Local starts giving error - #198
Conversation
- Investigating where buffer per frame value is getting set at 3, likely self._buffer_npix is getting its values - adjusting the StreamBit header file and the config file according to
and changed baud rate to 5 MHz for FPGA
…number of buffers and dummy words to better match the firmware)
…h/buffer block length) NOT WORKING
and changed baud rate to 5 MHz for FPGA
…number of buffers and dummy words to better match the firmware)
…h/buffer block length) NOT WORKING
Copied last function in types.py and copied to my code (maybe accidentally changed)
Changed yml MSUS file bitstream pointer to 5 MHz
Changed blocksize back to 4000, which should include the data+header
For some reason MSUS config had an incorrectly tabbed if statement, hopefully fixed in this commit
Output data that the FPGA receives (so far, just \x00\x8f\xff)
right now the data is not properly being read by MIO and the output text file gives some 0x00....0x8f....0xff which is not what is being sent out from the dev board
msus - test frame processing values with bright/dark sample
Converting datastream to 8bit value. Will need to modularize this a bit better, currently inside of buffer_to_array
Increased time for debug and comments
Increased time for debug and comments
Just modified some comments and added a test as a proof of concept
This reverts commit 17a69c2.
We now have video recording capabilities on MIO
minor update to mio before starting branch to fix 12 MHz version
quick check before branching
Implemented ROI row by row flexibility
Implementing ROI based MSUS/MIO interface (changed to 8 MHz)
Branch for 12 to 8 bit conversion that is already processed on board the MSUS
Corrected yaml file for new data block sizes
Created an MSUS ROI Yaml file for testing
testing for ROI from MSUS
changes to MSUS ROI for the smaller region of interest MSUS ROI (8 MHz output, 120x120x8 pixel)
Modifeid some of the settings for ROI on GSM (12 to 8 bit processing) full frame
|
this would be an issue, not a pull request, but let me see |
|
note the error message:
is either of those files open in another program? |
|
Noted! No there is no other process that should be using those log files, I also noticed a ".log.1" file being created, maybe the log file is getting too large so it creates a new log.# file and that is where the errors start to show? |
|
right, yeah, that's what's happening, it is trying to roll over the log files, but it can't because something is holding a reference to it. this could be just a windows thing, but we probably need to split out the loggers by process anyway. i'm going to close this and convert to an issue |
|
an example of raising an issue - #199 |
Hi @sneakers-the-rat - I am getting the following terminal text repeated when I attempt to record video with MIO for long (>10 minutes)
--- Logging error ---
Traceback (most recent call last):
File "
\Programs\Python\Python313\Lib\logging\handlers.py", line 80, in emit\Lib\logging\handlers.py", line 185, in doRolloverself.doRollover()
~~~~~~~~~~~~~~~^^
File "
self.rotate(self.baseFilename, dfn)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File
\Lib\logging\handlers.py", line 121, in rotate\logs\mio.log' -> 'os.rename(source, dest)
~~~~~~~~~^^^^^^^^^^^^^^
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: '
\mio\mio\logs\mio.log.1'mio\logs\mio.log' -> 'C~\mio\logs\mio.log.1'Call stack:
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\hsemwal\Documents\Github\mio.venv\Scripts\mio.exe_main.py", line 6, in
sys.exit(cli())
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\hsemwal\Documents\Github\mio\mio\cli\stream.py", line 106, in capture
daq_inst.capture(
File "C:\Users\hsemwal\Documents\Github\mio\mio\stream_daq.py", line 616, in capture
self._handle_frame(
File "C:\Users\hsemwal\Documents\Github\mio\mio\devices\gs\daq.py", line 110, in _handle_frame
self.logger.debug("Saving header metadata")
Message: 'Saving header metadata'
Arguments: ()
WARNING [mio.streamDaq.buffer] Frame 17010; Buffer 136083 (#2 in frame) stream_daq.py:182
Expected buffer data length: 13120, got data with shape 13120.
Padding to expected length
DEBUG [mio.GSStreamDaq] Saving header metadata daq.py:110
DEBUG [mio.streamDaq.buffer] ----buffer #2 stored stream_daq.py:389
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\hsemwal\AppData\Local\Programs\Python\Python313\Lib\logging\handlers.py", line 80, in emit
self.doRollover()
~~~~~~~~~~~~~~~^^
File "C:\Users\hsemwal\AppData\Local\Programs\Python\Python313\Lib\logging\handlers.py", line 185, in doRollover
self.rotate(self.baseFilename, dfn)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hsemwal\AppData\Local\Programs\Python\Python313\Lib\logging\handlers.py", line 121, in rotate
os.rename(source, dest)
~~~~~~~~~^^^^^^^^^^^^^^
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\hsemwal\AppData\Local\mio\mio\logs\mio.log' -> 'C:\Users\hsemwal\AppData\Local\mio\mio\logs\mio.log.1'
Call stack:
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\hsemwal\Documents\Github\mio.venv\Scripts\mio.exe_main.py", line 6, in
sys.exit(cli())
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\hsemwal\Documents\Github\mio\mio\cli\stream.py", line 106, in capture
daq_inst.capture(
File "C:\Users\hsemwal\Documents\Github\mio\mio\stream_daq.py", line 616, in capture
self._handle_frame(
File "C:\Users\hsemwal\Documents\Github\mio\mio\devices\gs\daq.py", line 110, in _handle_frame
self.logger.debug("Saving header metadata")
Message: 'Saving header metadata'
Arguments: ()
DEBUG [mio.GSStreamDaq] Saving header metadata daq.py:110
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\hsemwal\AppData\Local\Programs\Python\Python313\Lib\logging\handlers.py", line 80, in emit
self.doRollover()
~~~~~~~~~~~~~~~^^
File "C:\Users\hsemwal\AppData\Local\Programs\Python\Python313\Lib\logging\handlers.py", line 185, in doRollover
self.rotate(self.baseFilename, dfn)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hsemwal\AppData\Local\Programs\Python\Python313\Lib\logging\handlers.py", line 121, in rotate
os.rename(source, dest)
~~~~~~~~~^^^^^^^^^^^^^^
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C:\Users\hsemwal\AppData\Local\mio\mio\logs\mio.log' -> 'C:\Users\hsemwal\AppData\Local\mio\mio\logs\mio.log.1'
Call stack:
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\hsemwal\Documents\Github\mio.venv\Scripts\mio.exe_main.py", line 6, in
sys.exit(cli())
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\hsemwal\Documents\Github\mio.venv\Lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\Users\hsemwal\Documents\Github\mio\mio\cli\stream.py", line 106, in capture
daq_inst.capture(
File "C:\Users\hsemwal\Documents\Github\mio\mio\stream_daq.py", line 616, in capture
self._handle_frame(
File "C:\Users\hsemwal\Documents\Github\mio\mio\devices\gs\daq.py", line 110, in _handle_frame
self.logger.debug("Saving header metadata")
Message: 'Saving header metadata'
Arguments: ()
WARNING [mio.streamDaq.buffer] Frame 17010; Buffer 136084 (#3 in frame) stream_daq.py:182
Expected buffer data length: 13120, got data with shape 13120.
Padding to expected length
DEBUG [mio.GSStreamDaq] Saving header metadata daq.py:110
DEBUG [mio.streamDaq.buffer] ----buffer #3 stored stream_daq.py:389
--- Logging error ---
Traceback (most recent call last):
File "C:\Users\hsemwal\AppData\Local\Programs\Python\Python313\Lib\logging\handlers.py", line 80, in emit
self.doRollover()
~~~~~~~~~~~~~~~^^
File "C:\Users\hsemwal\AppData\Local\Programs\Python\Python313\Lib\logging\handlers.py", line 185, in doRollover
self.rotate(self.baseFilename, dfn)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hsemwal\AppData\Local\Programs\Python\Python313\Lib\logging\handlers.py", line 121, in rotate
os.rename(source, dest)
~~~~~~~~~^^^^^^^^^^^^^^
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'C
[26-07-22T17:01:35] DEBUG [mio.streamDaq.iter_buffers] Got end of recording exception, breaking
📚 Documentation preview 📚: https://miniscope-io--198.org.readthedocs.build/en/198/