blacktwin / JBOPS

Just a Bunch Of Plex Scripts
1.66k stars 308 forks source link

AttributeError: 'Line2D' object has no attribute '_legmarker'. Did you mean: '_marker'? #351

Closed goku-son closed 1 year ago

goku-son commented 2 years ago

When running the ips_to_maps.py command with no parameters, it fails towards the end with this:

Traceback (most recent call last):
  File "/app/python/maps/./ips_to_maps.py", line 458, in <module>
    draw_map(opts.map, geo_json, filename, opts.headless, opts.legend)
  File "/app/python/maps/./ips_to_maps.py", line 364, in draw_map
    leg.legendHandles[i]._legmarker.set_markersize(10)
AttributeError: 'Line2D' object has no attribute '_legmarker'. Did you mean: '_marker'?

Running on Docker with Python 3.10.6. The json file is created. but not the png map.

If I run the command with no --no_legend flag is creates the png file, but produces this error at the end:

Traceback (most recent call last):
  File "/app/python/maps/./ips_to_maps.py", line 458, in <module>
    draw_map(opts.map, geo_json, filename, opts.headless, opts.legend)
  File "/app/python/maps/./ips_to_maps.py", line 378, in draw_map
    mng.window.state('zoomed')
AttributeError: 'FigureManagerBase' object has no attribute 'window'

If I run the command with both the --no_legend and--headless parameters, it completes with no issues and the map is generated. I would love to get it to work with the legend though.

blacktwin commented 1 year ago

Are you still observing this issue? I know this is an old issue, sorry. Last time I touched this script everything was working ok IIRC, I even made a couple changes. I don't think my changes would have affected your issue though.

lightmaster commented 1 year ago

@blacktwin I am seeing this issue