Skip to content

Control-C during plotting triggers AttributeError: 'Dict' object has no attribute 'xlim' #22

@haavee

Description

@haavee

Every now and then I saw this error popping up: 'Dict' object has no attribute 'xlim', but did not now how to reproduce.

Accidentally, when running with debug info and playing around, seem to have found a way to reproduce: press ^C whilst the system is generating the plots. The next attempt to plot will give this error at the end.

As a bonus, here's the backtrace:

jcli> cd /jop98_2/scratch/cook/VLA; ms line1.ms; indexr; pt phachan; scan 2-5; avt vector; nxy 4 12; new time t; sort bl time; show noheader; pl
ms: Current MS is 'line1.ms' containing 388700 rows of Spectral data for uid://evla/pdb/36820386 [DATA]
Running indexr. This may take some time.
indexr: found  10  scans. (use 'listr' to inspect)
plotType:                 phachan [phase versus channel]
  2: 04-Aug-2019/09:25:57.000  11m31.50s dT:12.00s J0542+4951      (0) (ARRAY_ID 0)
  3: 04-Aug-2019/09:37:39.000  42m24.00s dT:12.00s 3C84            (1) (ARRAY_ID 0)
  4: 04-Aug-2019/10:20:18.000  13m45.00s dT:12.00s J0542+4951      (0) (ARRAY_ID 0)
  5: 04-Aug-2019/10:34:15.000  42m24.00s dT:12.00s 3C84            (1) (ARRAY_ID 0)
averageTime:              Vector
layout[phachan]:          48 plots organized as 4 x 12 [flexible,rows]
new plots on:             FQ BL TIME
sort order [phachan]: bl time
show[phachan]:            NoHeader
Query took		0.067s
Data munching took      21.293s
WARNING: 200 out of 2600 data sets contained only NaN values (7.69%)!
min/max processing took	0.015s
Traceback (most recent call last):
  File "/jop98_0/scratch/verkout/src/jiveplot/command.py", line 439, in run
    drap(lambda x: self.parseOneCmd(x) if not self.exit else None, \
  File "/jop98_0/scratch/verkout/src/jiveplot/functional.py", line 95, in <lambda>
    drap        = lambda *args, **kwargs: drain(map(*args, **kwargs))
  File "/jop98_0/scratch/verkout/src/jiveplot/command.py", line 439, in <lambda>
    drap(lambda x: self.parseOneCmd(x) if not self.exit else None, \
  File "/jop98_0/scratch/verkout/src/jiveplot/command.py", line 544, in parseOneCmd
    cmd.cb()
  File "/jop98_0/scratch/verkout/src/jiveplot/jplotter.py", line 2499, in <lambda>
    cb=lambda : do_plot(env()), id="pl") )
  File "/jop98_0/scratch/verkout/src/jiveplot/jplotter.py", line 2463, in do_plot
    redraw_after_new(e)
  File "/jop98_0/scratch/verkout/src/jiveplot/jplotter.py", line 2486, in redraw_after_new
    do_redraw(e)
  File "/jop98_0/scratch/verkout/src/jiveplot/jplotter.py", line 2495, in do_redraw
    j().drawFunc(e.plots, ppgplot, e.first, foo[o.curdev].navigable(), ncol=e.devNColor)
  File "/jop98_0/scratch/verkout/src/jiveplot/jplotter.py", line 1687, in drawFunc
    plotter.drawfunc(dev, plotar, fst, onePage, **opts)
  File "/jop98_0/scratch/verkout/src/jiveplot/plots.py", line 1529, in drawfunc
    xmin     = reduce(min, map(lambda x: plotar.limits[x].xlim[0], self.yAxis), float('inf'))
  File "/jop98_0/scratch/verkout/src/jiveplot/plots.py", line 1529, in <lambda>
    xmin     = reduce(min, map(lambda x: plotar.limits[x].xlim[0], self.yAxis), float('inf'))
AttributeError: 'Dict' object has no attribute 'xlim'
'Dict' object has no attribute 'xlim'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions