markwal / OctoPrint-GPX

An OctoPrint plug-in to use GPX as the protocol layer underneath rather than replacing g-code to talk to s3g/x3g machines, for example, a FlashForge.
GNU Affero General Public License v3.0
104 stars 26 forks source link

Getting UnicodeDecodeError every time I try to start a print #2

Closed themaskedbear closed 9 years ago

themaskedbear commented 9 years ago

Hi,

First, thanks for the job you've done.

I have a makerbot replicator 2X with sailfish firmware. I've generated a x3g file from makerware which I've uploaded to octoprint. Every time I try to print the x3g uploaded I have this kind of error in the web interface:

Error: UnicodeDecodeError: ''ascii' codec can't decode byte 0x9d in position 0: ordinal not in range(128)' @ comm.py:startPrint:528

And this in the log file : ==> /home/pi/.octoprint/logs/octoprint.log <== 2015-05-15 13:23:05,635 - octoprint.util.comm - ERROR - Error while trying to start printing Traceback (most recent call last): File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.2.0_dev_854_gfa57f16-py2.7.egg/octoprint/util/comm.py", line 528, in startPrint self.sendCommand(line) File "/home/pi/oprint/local/lib/python2.7/site-packages/OctoPrint-1.2.0_dev_854_gfa57f16-py2.7.egg/octoprint/util/comm.py", line 422, in sendCommand cmd = cmd.encode('ascii', 'replace') UnicodeDecodeError: 'ascii' codec can't decode byte 0x9d in position 0: ordinal not in range(128)

And this for each x3g uploaded.

Strange thing is that putting the same x3g file on the SD card, and then launch the print from the octoprint interface works.

Do you have any clue about the problem ?

markwal commented 9 years ago

Yes, OctoPrint doesn't understand x3g really. Only gcode, so to upload to OctoPrint and print from there, you need to use the gcode file. If you do though make sure the gpx.ini on the pi is what you want.

I'm working on making that simpler as well as a flashair plugin to allow OctoPrint to push the x3g to the SD card and start it from there.

markwal commented 9 years ago

By the way, you can export the gcode from makerware and upload that instead. In case that wasn't clear from my response.