Please let me know. Unable to open SVG file with k40 whisperer

Unable to open SVG file with k40 whisperer.
You cannot open the file using the sample on the official website.
Teach me Please.

This is a picture of the error.

Is space available on the C drive?

I moved this to the K40 Whisperer category for @Scorch

There is a lot of capacity left.

  1. Look at the “Inkscape Executable” entry field in the General Settings window. Generally the field for “Inkscape Executable” should be blank. If there is anything in that field delete it then click on the “Save” button next to “Configuration File” so the setting is remembered for future K40 Whisperer sessions.

  2. After you have deleted any text in the “Inkscape Executable” field try loading an SVG file.

Scorch

2 Likes

thank you for your reply.

I tried that method but it didn’t work.
Is there any other possible cause?

The error window has some characters that are not typical (i.e. the character that appears twice after C:) Generally the character in those places would be “”. I don’t know what would cause this. Possibly your operating system language is set to something other than English. I don’t know if the characters are causing an issue or not but it is something that I have not seen before.

Getting „ instead of \ is an ASCII thing. There was no code point reserved for „ (the yen currency symbol) in 7-bit ASCII. As a workaround, lots of Asian fonts simply replaced the \ character (0x5C) with „.

So, there is nothing wrong here. That’s just how a “backslash” looks like with that font.

In order to get to the message shown, K40 Whisperer must have found the Inkscape executable and Inkscape was execited to creste the raster data. After that the raster data was not found in the temp folder.

I am not sure what is causing this error. Usually this error ocurs when the wrong execitable is specified in the general settings entry. If that entry is blank I am not sure how this happened.

If you know how to use the command line, run the Python interpreter from the command line and then type these two lines:

import tempfile
tempfile.gettempdir()

It should then print the path of some temp directory. Does that work or do you get that error message?


It was too technical and difficult, but I tried it.
SVG files cannot be opened.

Scorch spelled out the 2 things to work through to try and pin this problem down.
One is to switch your OS default language to English and see if that changes the error.

The other was that K40 Whisperer is calling on Inkscape to process the file and Inkscape made the leap to version 1.0 recently so if you are running v1.x then try installing version 0.92 and pointing K40 Whisperer to that executable and see what happens.

2 Likes

I see you have Python 3.9.7 installed on your computer. Are you running the pre-compiled version of K40 Whisperer (i.e. the .exe file) or are you running it with your python install?

I have not tested it with that python version. The exe file uses the version of python it is bundled with.

Scorch

thankyou for the explanation :slightly_smiling_face:

InkscapeăƒăƒŒă‚žăƒ§ăƒłă§0.92ず1.1ă‚’è©Šă—ăŸă—ăŸă€‚
OSăźèš€èȘžăŻæ—„æœŹèȘžă§ă™ăŒă€ć•éĄŒăȘă„ăšæ€ă„ăŸă™ă€‚

I tried 0.92 and 1.1 with Inkscape version.
The OS language is Japanese, but I don’t think there is a problem.

I don’t know Python, but I put it in.
K40 Whisperer is running as an exe file.

I don’t know what is causing the issue.

Have you tried MeerK40t. That is another free program that works with the stock board. Nothing says you need to use K40 Whisperer.

Scorch

1 Like

Meer K40t was available.
The K40 Whisperer is simple and easy to use, so I wanted to use it in the main.
Trial and error.
Thank you for your advice.

If you feel adventurous, download the “src.zip” of K40 Whisperer and then run it from the command line:

python k40_whisperer.py

If you now get an exception, you should see a stack trace. A stack trace shows exactly where the error happened and how we got there (call stack).

Running the .exe from the command line likely won’t show any output.

However, redirecting the stdout and stderr streams to a file should work:

k40_whisperer.exe > output.txt 2>&1

> output.txt redirects stdout to a file. 2>&a1 redirects stderr to stdout. So, both types of text output should end up in output.txt.

So, run it like that, try to open an SVG, close K40 Whisperer, and then check the contents of output.txt. It should contain the stack trace.

For what it’s worth, I assume it’s the tempfile.mkdtemp() call in the convert_text2paths or Make_PNG function. I assume that call fails for whatever reason.

Since finding the user temp directory did work just fine with Python 3.9.7, running K40 Whisperer with that version of Python might also work. I assume there is some encoding issue with the Python version which is used by the EXE.

1 Like

It seems like this is a Python 2.x problem:

https://bugs.python.org/issue1681974

@Scorch

Does the EXE use 2.x?

@makoto

If you just want to get the EXE to work, creating a separate user with an ASCII user name (e.g. “K40”) should do the trick.

Switching between users is kinda annoying, but this workaround is better than nothing, I guess.

4 Likes