scousepy icon indicating copy to clipboard operation
scousepy copied to clipboard

Blank coverage.config can be produced, breaks next steps

Open keflavich opened this issue 3 years ago • 3 comments

If the coverage.config file is missing, the following error results:

Traceback (most recent call last):
  File "<ipython-input-4-e12c0a20cd7b>", line 1, in <module>
    s = scouse.stage_1(config=config_file, interactive=True) # GUI based
  File "/blue/adamginsburg/adamginsburg/repos/scousepy/scousepy/scouse.py", line 349, in stage_1
    coverageobject=ScouseCoverage(scouseobject=self,verbose=self.verbose,
  File "/blue/adamginsburg/adamginsburg/repos/scousepy/scousepy/scousecoverage.py", line 49, in __init__
    if (self.x_range[0] is None) or (self.x_range[0] < 0):
AttributeError: 'ScouseCoverage' object has no attribute 'x_range'

The blank coverage.config resulted from a failed run of example_script.py, though I don't understand the origin of the failure.

keflavich avatar Feb 03 '22 17:02 keflavich

can you give me a bit more info here - was the config file produced but was blank? How are you running scousepy? The only time i've seen this is when running in jupyter notebooks where the plt function for the coverage doesn't pause the script and it continues before interaction with the open plot window can occur

jdhenshaw avatar Feb 04 '22 10:02 jdhenshaw

That's likely what happened: I tried running in Jupyter lab first, and it did indeed produce a blank config file.

The solution is then probably to not write a config file until the interactive session is done?

keflavich avatar Feb 04 '22 12:02 keflavich

(you can run scousepy in jupyterlab, btw - the interactive stuff (mostly) works)

keflavich avatar Feb 04 '22 12:02 keflavich