Error when trying example scripts
See original GitHub issueI am running python 2.7 on macOS. When I want to try the example script, i.e. from_genbank.py, I get the following error:
Traceback (most recent call last): File "with_plot.py", line 11, in <module> ax, levels = graphic_record.plot() File "/Library/Python/2.7/site-packages/dna_features_viewer/dna_features_viewer.py", line 234, in plot box_linewidth=box_linewidth, box_color=box_color File "/Library/Python/2.7/site-packages/dna_features_viewer/dna_features_viewer.py", line 207, in annotate_feature x1, y1, x2, y2 = get_text_box(text, margin=margin) File "/Library/Python/2.7/site-packages/dna_features_viewer/utils.py", line 39, in get_text_box renderer = text.axes.figure.canvas.get_renderer() AttributeError: 'FigureCanvasMac' object has no attribute 'get_renderer' Tobiass-Air:examples Tobias$ python from_genbank.py Traceback (most recent call last): File "from_genbank.py", line 3, in <module> graphic_record = BiopythonTranslator().translate_record("example_sequence.gb") File "/Library/Python/2.7/site-packages/dna_features_viewer/dna_features_viewer.py", line 468, in translate_record return grecord_class(sequence_length=len(record.seq), features=[ AttributeError: 'str' object has no attribute 'seq'
The other example scripts do not work either.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
That version if from 4 years ago, we may have something there. Can you try upgrading it ? This should install matplotlib 2.x (which as far as i know is retro-compatible so you shouldn’t have trouble with other projects):
What this means is that the latest changes and fixes on Github had not been pushed on PyPI, so that was an actual bug. Thanks for the report !