HPGL/2 import arbitrarily produce error

Bug #892049 reported by Anonymous
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Low
Unassigned
UniConvertor
Confirmed
Undecided
Unassigned

Bug Description

Trying to Import HPGL/2 file in both Inkscape Versions 0.48.2-1 and r10736 via the following procedure:
Restart inkscape
Menu-File-(open or import)->select *.plt as file type-> select file -> open
  then in an arbitrarily way in most cases inkscape reports the following error message:
UniConvertor failed:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\usrprgs\p_inkscape_0.48.2-1\python\lib\site-packages\uniconvertor\__init__.py", line 95, in uniconv_run
    doc = load.load_drawing(input_file)
  File "D:\usrprgs\p_inkscape_0.48.2-1\python\lib\site-packages\uniconvertor\app\io\load.py", line 377, in load_drawing
    return load_drawing_from_file(file, filename)
  File "D:\usrprgs\p_inkscape_0.48.2-1\python\lib\site-packages\uniconvertor\app\io\load.py", line 359, in load_drawing_from_file
    raise SketchLoadError(_("unrecognised file type"))
app.events.skexceptions.SketchLoadError: unrecognised file type

sometimes it works.
InkScape is running in a Windows 7 / 64bit version with 8GB of memory.

If import works, imported object is 163436px by 92835px in size, maybe quite large....?
attached are the first and last lines of the HPGL/2 file. (there are some more "MG" (Message Commands) at the beginning, which I removed for better readability.)

MG FT80 = FT4,55,15.000000
MG FT81 = FT4,55,45.000000
MG FT82 = FT4,55,60.000000
MG FT83 = FT4,55,75.000000
IN;
PU3,-3;IR0,0,100,100;
SC-92265,1937265,-260136,1308137,1;
SP41;
PW0.350000;
SC;
FT3,30,30.000000;
SC-92265,1937265,-260136,1308137,1;
PA1310000,120890;
PD;PA1320610,131500;
PA1354390,131500;
PA1365000,120890;
PA1365000,87110;
PA1354390,76500;
PA1320610,76500;
PA1310000,87110;
PA1310000,120890;
PU;PA1155000,120890;
PD;PA1165610,131500;
...........
...........
PA1832660,1035660;
PA1832660,1037160;
PA10840,1037160;
PA10840,10840;
PA1834160,10840;
PA1834160,1037160;
SC;
FT1,60,15.000000;
SC-92265,1937265,-260136,1308137,1;
PU;PA0,0;
PD;PA0,1048000;
PA1845000,1048000;
PA1845000,0;
PA0,0;
PU;PW0.350000;
SP54;
SP66;
SP99;
PW1.400000;
FT;
PW0.350000;
SP54;
SP66;
PW0.350000;
SP41;
PG;

Thanks again for your great work!

Revision history for this message
su_v (suv-lp) wrote :

> attached are the first and last lines of the HPGL/2 file

Could you please attach complete sample PLT / HPGL2 files (files that work as well as files that fail to import) instead of quoting parts only? This would allow to test the reported problem on other systems, without introducing possibly unrelated issues when trying to recreate PLT / HPGL2 files based on the given information.

tags: added: importing uniconvertor win32
removed: hpgl2 import
Revision history for this message
su_v (suv-lp) wrote :

From the bug summary:
> HPGL/2 import arbitrarily produce error

<quote>
import / export filter in uniconvertor designed to work with cutting plotters. Which support a limited set of commands hpgl.
</quote>

See <http://sk1project.org/forum/viewthread.php?thread_id=263>, which describes a similar issue.

Revision history for this message
Anonymous (susi-8888) wrote :

Hello,
  by following your link, there is a statement, that the HPGL file should start mandatory with an "IN" command (=initialize), while my one is starting in advance to the "IN" command with a set of "MG" commands (=message), which will be ignored by the plotter ideally. By removing all leading commands before the "IN" command, a few trial openings or imports works fine.

Revision history for this message
Anonymous (susi-8888) wrote :

See one file with "MG" commands in advance to the "IN" added (will not work):

Revision history for this message
Anonymous (susi-8888) wrote :

and the same one, bit all leading "MG" commands removed (will work fine)

Revision history for this message
jazzynico (jazzynico) wrote :

Reproduced on Windows XP, Inkscape 0.48.2 and trunk revision 10938.

Changed in uniconvertor:
status: New → Confirmed
Changed in inkscape:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
A.L.B. (alain-rx) wrote :

Hello,

I would like to refloat this thread.

I'am trying to save one vector as PLT and there is a problem.

Here is the bug report:
[IMG]http://i46.tinypic.com/w1ugw.jpg[/IMG]

http://i46.tinypic.com/w1ugw.jpg

My software plotter only can read plt and eps format (and the last one doesn't run right)

Thanks in advance.

Revision history for this message
A.L.B. (alain-rx) wrote :

Sorry, I bring more data:

Windows Vista 32x
Inkscape version 0.48.4.1
Language: Spanish
Type of error: saving as (HPGL) PLT format

Revision history for this message
su_v (suv-lp) wrote :

A.L.B. wrote:
> Type of error: saving as (HPGL) PLT format

This bug (#892049) is about a specific issue when _opening_ PLT files (i.e.converting HPGL/PLT to SVG), and not about saving as PLT (i.e. converting SVG to PLT).

> Windows Vista 32x

Based on the message shown in the screenshot, and your version of Windows, it's likely a more generic type of failure with output extensions based on UniConvertor which apparently affects Windows Vista / 7 equally. A similar report for saving as PLT has already been filed as bug #1070261 (that report itself is a duplicate of bug #656938 since the same issue affects several output file formats which make use of UniConvertor).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.