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

Exceptions when CutStudio not installed, Win10, Inkscape 1.2 #29

Open
dtwitkowski opened this issue Sep 5, 2023 · 3 comments
Open

Exceptions when CutStudio not installed, Win10, Inkscape 1.2 #29

dtwitkowski opened this issue Sep 5, 2023 · 3 comments
Labels
bug good first issue Easy issues for new developers

Comments

@dtwitkowski
Copy link

Describe the bug
When installed on Windows 10 under Inkscape 1.2, with CutStudio not installed, the Extension throws Exceptions.

To Reproduce
Input file:
Does the bug also happen with this test file: https://github.com/mgmax/inkscape-roland-cutstudio/raw/master/test-input.svg ? YES

Steps to reproduce the behavior (please change as needed):

  1. Open the file with Inkscape
  2. Extensions - Roland CutStudio - Open in CutStudio

Does the issue also occur on a second computer? UNKNOWN. Installation on MacOS reportedly works.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
Traceback (most recent call last):
File "C:\Program Files\Inkscape\share\inkscape\extensions\roland_cutstudio.py", line 414, in
Popen([which("CutStudio\CutStudio.exe", True), "/import", destination], creationflags=DETACHED_PROCESS, close_fds=True)
File "C:\Program Files\Inkscape\share\inkscape\extensions\roland_cutstudio.py", line 89, in which
raise Exception("Cannot find " + str(program) + " in any of these paths: " + str(pathlist) + ". Either the program is not installed, PATH is not set correctly, or this is a bug.")
Exception: Cannot find CutStudio\CutStudio.exe in any of these paths: ['C:\Program Files\Inkscape\bin', 'C:\Program Files\Inkscape\bin\', 'C:\WINDOWS\system32', 'C:\WINDOWS', 'C:\WINDOWS\System32\Wbem', 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\', 'C:\WINDOWS\System32\OpenSSH\', 'C:\Program Files\PuTTY\', 'C:\Program Files\WireGuard\', 'C:\Program Files\WinMerge', 'C:\Program Files\dotnet\', 'C:\WSJT\wsjtx\bin', 'C:\Users\dtwit\AppData\Local\Microsoft\WindowsApps', 'C:\Program Files (x86)\Nmap', 'C:\SDelete', 'C:\Program Files\CutStudio', '', 'C:\Program Files\Inkscape\bin\', 'C:\Program Files', 'C:\Program Files (x86)', 'C:\Program Files\', 'C:\Program Files\Inkscape\share']. Either the program is not installed, PATH is not set correctly, or this is a bug.

Versions (please complete the following information):

  • OS: Windows 10 22H2
  • Inkscape version: Inkscape 1.2.1 (9c6d41e410, 2022-07-14)
  • How is Inkscape installed: STANDARD
  • CutStudio version: NONE
  • Problem occurs with the newest plugin version from today: YES

Additional context
I tried setting the PATH to include "C:\Program Files\CutStudio" but this didn't help.

@mgmax
Copy link
Owner

mgmax commented Sep 5, 2023

Good find.
This case was never intended to work, but feel free to find a solution and submit a Pull Request. :-)

Basically, the Exception handling (try...except) here
https://github.com/mgmax/inkscape-roland-cutstudio/blob/master/roland_cutstudio.py#L419C9-L419C9
needs to be moved "outside" so that it also covers the Windows specific code
https://github.com/mgmax/inkscape-roland-cutstudio/blob/master/roland_cutstudio.py#L412

Or you find CutStudio somewhere and install it. Or switch to Inkcut and get rid of CutStudio :-) Unfortunately, Inkcut doesn't support special features like cropmark detection.

@dtwitkowski
Copy link
Author

Thanks Max. I was confused by the code/instructions section Using Without CutStudio Installed - I presumed that meant this extension would work as a standalone converter, but I guess not under Windows?

@mgmax
Copy link
Owner

mgmax commented Sep 6, 2023 via email

@mgmax mgmax added good first issue Easy issues for new developers bug labels May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Easy issues for new developers
Projects
None yet
Development

No branches or pull requests

2 participants