Closed CassandraAuri closed 1 year ago
Hi @CassandraAuri,
I am able to reproduce this error. I also confirmed that this error affects the themis()
imager instance.
As mentioned in this recent issue, it is a common bug with the Windows multiprocessing
module. The permanent solution necessitates the removal of the multiprocessing module from themis-imager-readfile
and rego-imager-readfile
which @dchaddock mentioned is unlikely. This leaves asilib
with two choices:
Refactor a copy of the themis-imager-readfile
and rego-imager-readfile
source code in asilib
. This is not difficult, but then asilib
's loaders will be unsupported by the Calgary developers. Given that the THEMIS and REGO data format is stable, this should be OK.
Instruct Windows users to use asilib inside of a if __name__ == '__main__':
block as I show in the example below. This is an easy fix if you're writing scripts using asilib
, but won't work if you put your asilib
analysis code into our own module and import it.
The example below, slightly modified, works on my Windows 10 machine.
from datetime import datetime, timedelta
import asilib
from asilib.asi import rego
if __name__ == '__main__':
time_range = (datetime(2021, 3, 18, 8, 0),
datetime(2021, 3, 18, 8, 5))
asi = rego.rego('GILL', time_range=time_range)
# And run either one of these two commands
asi.animate_fisheye() # animate fisheye images
I'm leaning towards option 1, but I am open to ideas or suggestions.
So I talked to darren and name == 'main' will just have to be the solution since everything they have runs like that.
Hi all - I am going through Cassandra's code right now working on figuring out the best way to address the issue. Updates should be available in the next few days.
With the latest release of our readfile libraries this morning, this issue has been resolved. You can do the following do get up-to-date.
pip install --upgrade trex-imager-readfile themis-imager-readfile rego-imager-readfile
Describe the issue:
When using this simpe code snippet where rego is from \asilib\asi\rego.py you get a runetime error from anaconda multiprocessing
RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
Reproduce the code example:
Error message:
Runtime information:
0.14.3 3.8.3 (default, Jul 2 2020, 17:30:36) [MSC v.1916 64 bit (AMD64)] Windows-10-10.0.19041-SP0
Context for the issue:
When testing TREX I was trying to figure out how imager.py was fetching the infromation (as it couldnt find the TREx file) fixing this would help me implement TREx into imager.py and then eventually a way to figure out a way to implement TREx into asilib.animate_fisheye_generator()