-
Notifications
You must be signed in to change notification settings - Fork 171
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
imagetracer.js for InkScape #47
Comments
Hi Mario, Thanks for your great work! I've updated the README with this. |
Hi @vmario89 The dry run of the nodecli command failed. This can be solved by using the latest nodejs and imagetracer. Second, there is an issue in the python script within the path and file structure in general. This causes that the nodecli.js is'nt correctly called. The nodecli.js didn't get called because of the whitespaces in the string. Fixed the function call of imagetracer by changing line:
to
Now the functions are called. |
Hi, thanks for reply. I had a look into it but i cannot see the issues right now. I tested on my Ubuntu system and it works flawlessly. did you try the latest code? https://gitea.fablabchemnitz.de/MarioVoigt/mightyscape-1.X/src/branch/master/extensions/fablabchemnitz/imagertracer.js the docs can be found at https://stadtfabrikanten.org/display/IFM/Imagetracer.js at least the changing from "Imagetracerjs().run()" to "Imagetracer().run()" looks strange. That should not work because there is no class with that name. you should convert back. making os.popen(command, "r") to os.popen('command', "r") will destroy command variable content. Instead it will be a static string with content "command". my inkscape extension already uses the latest imagetracer.js from this repo which is september 2020. using that commit fd7252f regarding node version: i am not sure about node version. i installed some node version with the apt package manager. should be some regular rpm package on Fedora. "node -v" gives me "v10.19.0" . So it seems i am using a really old one. but it works fine with it. should do the same job with node v11/12/13/14 hopefully. please try the following dry code line which would be called from that extension (you might need to change the working directory to your path accordingly):
some more questions to check:
regards and thanks sharing your feedback with me, Mario |
Thaks Mario! for the info!
The dry code works perfectly!
I use inkscape version: Node version is:
Running the newly downloaded code from within inkscape I still have the following error: |
Hi, thanks for feedback. I know. InkScape gallery has a small "link" URL which leads to the gitea repo. But most people oversee it (i did it too a long time ago^^). But maintaining on InkScape gallery is a bit frustrating. In newer InkScape version there is an extension manager. Real idea would be to integrate it directly in that manager system. can you tell me where your node exectuable is located? You can try could be that your system's PATH environment variable does not contain the node command. the following might help: Do you execute InkScape from the same user as you execute InkScape? |
please leave me some feedback when you have time. maybe i have an idea then :-) |
Yes, I run inkscape from the same user.
Running command: |
hmmmm ... what happens if you run inkscape as root? i think it has to be a permission issue or $PATH environment variable issue |
Some follow up info. The terminal did not recognize the command
From this install the extenstion directory changed to
Next attempt running
P.S. Also tried to use the plugin on a different machine running windows 10. That one was also unable to complete the operation due to errors. (All of the time I used the latest source from your git). |
The stack lines
makes no sense to me. seems the temp dir is not accesible by the node process so no svg is written. the toolchain cannot continue without svg input. but it should throw another error. i tested it again using InkScape 1.0.2 on Windows. Just copied imagetracer.js directory into extensions dir and everything is fine. No errors generated. stupid question: don't you run the extension from visual GUI? Are you testing it by CLI? I never made this extension for CLI mode. At least i never tested it. |
I'm getting this error. I'm on Windows 10. Inkscape 1.3.2 Error while processing input: [TypeError: undefined is not a function] Check the image file (maybe convert and save as new file) and try again. Your parser command: |
this is hard to debug. do you have any additional infos? how did you install the inkscape extension? i cannot see from where that typerror comes. please send me a full error stack trace and/or screenshot please |
Hi,
i did some work with InkScape and had the idea to make a wrapper for InkScape > https://inkscape.org/~MarioVoigt/%E2%98%85imagetracerjs-for-inkscape-1x
If you like just add it to your readme / docs =)
regards, Mario
The text was updated successfully, but these errors were encountered: