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

Linear dimension error #23

Open
FreitasVitor opened this issue Oct 23, 2024 · 13 comments
Open

Linear dimension error #23

FreitasVitor opened this issue Oct 23, 2024 · 13 comments

Comments

@FreitasVitor
Copy link

Whenever I try to add a linear dimension I get the error below, is there any workaround? I think I followed the instructions accordingly.

Traceback (most recent call last):
File "C:\Users\freitasvitor\AppData\Roaming\inkscape\extensions\dimensions\dimensions.py", line 901, in
dimension.run()
File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 252, in run
self.save_raw(self.effect())
^^^^^^^^^^^^^
File "C:\Users\freitasvitor\AppData\Roaming\inkscape\extensions\dimensions\dimensions.py", line 197, in effect
arrowStart = inkDraw.marker.createMarker(self, 'DimmArrow_Start', markerPath, renameMode, strokeColor=None, fillColor=self.lineColor,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\freitasvitor\AppData\Roaming\inkscape\extensions\inkscapeMadeEasy\inkscapeMadeEasy_Draw.py", line 574, in createMarker
ExtensionBaseObj.svg.get_ids().add(nameID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict_keys' object has no attribute 'add'

@fsmMLK
Copy link
Owner

fsmMLK commented Oct 23, 2024

I found this bug a couple of days ago after inkscape update. I just uploaded a new version of inkscapeMadeEasy. Please download and install inkscapeMadeEasy again. It will fix the problem.

@FreitasVitor
Copy link
Author

Thanks alot for the fix!

@FreitasVitor
Copy link
Author

I've updated the inkscapeMadeEasy_Draw.py file but I'm still getting the same error unfortunately

@ighrdm
Copy link

ighrdm commented Nov 13, 2024

I've updated the inkscapeMadeEasy_Draw.py file but I'm still getting the same error unfortunately

Made the same today. Same error

@FreitasVitor
Copy link
Author

FreitasVitor commented Nov 13, 2024

I've updated the inkscapeMadeEasy_Draw.py file but I'm still getting the same error unfortunately

Made the same today. Same error

I managed to make it work by downgrading my inkscape version to 13.x
I also had to adjust some commands on some of the .py files.

@fathi0amir
Copy link

fathi0amir commented Dec 9, 2024

I've updated the inkscapeMadeEasy_Draw.py file but I'm still getting the same error unfortunately

Made the same today. Same error

I managed to make it work by downgrading my inkscape version to 13.x I also had to adjust some commands on some of the .py files.

I have updated the files for the plugin but I also get the same error.

@FreitasVitor Could you help me to modify the .py file to make it work?

I would like to add, I also updated the files for InkscapeMadeEasy. I have another extension (Plot 2D) that relies on this, and it works after this update.

@FreitasVitor
Copy link
Author

FreitasVitor commented Dec 10, 2024

I've updated the inkscapeMadeEasy_Draw.py file but I'm still getting the same error unfortunately

Made the same today. Same error

I managed to make it work by downgrading my inkscape version to 13.x I also had to adjust some commands on some of the .py files.

I have updated the files for the plugin but I also get the same error.

@FreitasVitor Could you help me to modify the .py file to make it work?

I would like to add, I also updated the files for InkscapeMadeEasy. I have another extension (Plot 2D) that relies on this, and it works after this update.

Of course! You can download 1.3.2 Inkscape version at the official page:

https://inkscape.org/release/inkscape-1.3.2/windows/64-bit/msi/?redirected=1

After that, I had to edit the base.py file of TexText extension. Just changed the command "--pdf-page" for "--pages", as is discussed on the topic below:

https://gitlab.com/inkscape/inkscape/-/issues/4536

After that, it should work. I still get some errors while using the inkscapeDimensions and TexText extensions, but it compiles just fine, with all functionalities working as intended. If you are experiencing a different error, feel free to send it over here so we can try to work around it.

@fathi0amir
Copy link

I've updated the inkscapeMadeEasy_Draw.py file but I'm still getting the same error unfortunately

Made the same today. Same error

I managed to make it work by downgrading my inkscape version to 13.x I also had to adjust some commands on some of the .py files.

I have updated the files for the plugin but I also get the same error.
@FreitasVitor Could you help me to modify the .py file to make it work?
I would like to add, I also updated the files for InkscapeMadeEasy. I have another extension (Plot 2D) that relies on this, and it works after this update.

Of course! You can download 1.3.2 Inkscape version at the official page:

https://inkscape.org/release/inkscape-1.3.2/windows/64-bit/msi/?redirected=1

After that, I had to edit the base.py file of TexText extension. Just changed the command "--pdf-page" for "--pages", as is discussed on the topic below:

https://gitlab.com/inkscape/inkscape/-/issues/4536

After that, it should work. I still get some errors while using the inkscapeDimensions and TexText extensions, but it compiles just fine, with all functionalities working as intended. If you are experiencing a different error, feel free to send it over here so we can try to work around it.

Thanks @FreitasVitor for your help. I will test and update here. I have already 1.4 installation though and updated TexText extension. I couldn't find "--pdf-page" or "--pages" flag in base.py. But anyway, I will downgrade to 1.3 as you mentioned, check and update here.

@fsmMLK
Copy link
Owner

fsmMLK commented Dec 11, 2024

I will take a look at this issue this week.

@fathi0amir
Copy link

I will take a look at this issue this week.

Unfortunately, I still cannot find time to downgrade. I wanted to ask if you have an idea to use Dimensions with Inkscape 1.4.

@fsmMLK
Copy link
Owner

fsmMLK commented Dec 25, 2024

The extension is working in my machine with Inkscape 1.4 and textext 1.10.2

@fsmMLK
Copy link
Owner

fsmMLK commented Dec 25, 2024

I made one small modification to inkscapeMadeEasy. check if this will solve your problem.

@fathi0amir
Copy link

fathi0amir commented Dec 26, 2024

I made one small modification to inkscapeMadeEasy. check if this will solve your problem.

Thanks. It did solve my problem. I updated inkscapeMadeEasy and Dimensions extension and it works. However, while the "linear" works expectedly, the "Angular" annotation throws me a warning but works expectedly nonetheless. Below is the warning I get.

C:\Users\amir0\AppData\Roaming\inkscape\extensions\dimensions\dimensions.py:36: DeprecationWarning: row_stackalias is deprecated. Usenp.vstack directly. mat_A = np.row_stack((versor1, versor2))

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

4 participants