Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc not found, not in list errors #52

Closed
tfiers opened this issue Nov 17, 2022 · 2 comments
Closed

Misc not found, not in list errors #52

tfiers opened this issue Nov 17, 2022 · 2 comments

Comments

@tfiers
Copy link

tfiers commented Nov 17, 2022

Hi, this project is a great idea.

I get errors when trying to add text to an axis:

Traceback (most recent call last):
  File "C:\conda\lib\site-packages\pylustrator\components\qitem_properties.py", line 1019, in buttonAddTextClicked
    getReference(self.element), getReference(text)), text, ".new")
  File "C:\conda\lib\site-packages\pylustrator\change_tracker.py", line 162, in getReference
    raise TypeError(str(type(element)) + " not found")
TypeError: <class 'matplotlib.text.Text'> not found

or add an arrow:

Traceback (most recent call last):
  File "C:\conda\lib\site-packages\pylustrator\components\qitem_properties.py", line 1085, in buttonAddArrowClicked
    p._posA_posB[0], p._posA_posB[1], getReference(p)),
  File "C:\conda\lib\site-packages\pylustrator\change_tracker.py", line 104, in getReference
    index = element.axes.patches.index(element)
ValueError: <matplotlib.patches.FancyArrowPatch object at 0x0000017A2D76B820> is not in list

or change a Line2D's property:

<matplotlib.lines.Line2D object at 0x000001F3198B2160> is not in list

The edits are displayed in the plot, but are not saved to the .py file.

pylustrator version 1.2.1
matplotlib version 3.5.1

@rgerum
Copy link
Owner

rgerum commented Nov 17, 2022

its a problem with the exception_silencer and the recent matplotlib version. You can turn it of with:

pylustrator.start(use_exception_silencer=False)

with I will make the default in the next release

@tfiers
Copy link
Author

tfiers commented Nov 17, 2022

That fixes it indeed, thanks!

@rgerum rgerum closed this as completed Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants