Inkscape 0.92 can't open or save .plt files

Bug #1658260 reported by Jesus D Huila Contreras on 2017-01-21
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Low
jazzynico

Bug Description

I have .PLT files, which open with version 0.91, but the same does not happen with the new version 0.92, so I had to reinstall the old version.

I have installed version 0.92 again, with uniconvertor and Python 360, but it does not open my .PLT files. The problem is in inkscape.

su_v (suv-lp) wrote :

Please add information about OS/platform to the bug description, thank you.

Please also attach a test case (PLT file) to the bug report to allow further investigation of the reported issue on other systems.

Jesus D Huila Contreras wrote:
> I have installed version 0.92 again, with uniconvertor and Python 360

Inkscape requires Python 2, it does not (yet) support to run its python-based extensions with Python 3. The requirements for Python (as well as UniConvertor) should have been handled by whatever way you installed Inkscape (on Windows, the correct version of Python as well as UniConvertor are bundled with the installer; on Linux, this is normally handled by the package maintainer (with required or recommended dependencies for Inkscape).

Changed in inkscape:
status: New → Incomplete
jazzynico (jazzynico) on 2017-01-21
tags: added: importing plt
jazzynico (jazzynico) wrote :

Thanks for taking the time to file a report!

Issue reproduced on Windows XP (32-bit), with Inkscape 0.92. Not a surprise because the python-uniconvertor module was removed in 0.92. The SK1 project doesn't provide a python module for recent python versions on Windows, so it's a bit difficult for us to maintain PLT support.

I'm keeping the report open for now (we need to investigate if new tools can be found to replace uniconvertor), but I'm afraid it could be a "won't fix".
As a workaround, you can use external tools (there are some online SVG to PLT and PLT to SVG converters) or the binary package provided by the SK1 project (http://sk1project.net/dc.php?target=uniconvertor-1.1.5-win32.msi).

Changed in inkscape:
assignee: nobody → jazzynico (jazzynico)
importance: Undecided → Low
milestone: none → 0.93
status: Incomplete → Triaged
tags: added: exporting regression win32 win64
jazzynico (jazzynico) wrote :

Note to self:
The error message shows that gettext is not loaded correctly. To be fixed.
---
  File "uniconv-ext.py", line 54, in <module>
    sys.stderr.write(_('You need to install the UniConvertor software.\n'+\
NameError: name '_' is not defined
---

jazzynico (jazzynico) wrote :

Not better on Xubuntu 16.04. The Uniconvertor package fails to run correctly (even in standalone mode with the uniconvertor command line utility) due to a missing sk1 module.
Could someone else on a GNU/Linux distribution or OS-X operating system confirm?

su_v (suv-lp) wrote :

jazzynico wrote:
> Could someone else on a GNU/Linux distribution or OS-X operating
> system confirm?

Confirm what exactly? With my local installations on OS X 10.7.5 (uniconvertor for Python 2.7), saving as PLT and opening PLT files (via UniConvertor) works AFAICT with 0.92 as before with 0.91.

su_v (suv-lp) wrote :

su_v wrote:
> saving as PLT and opening PLT files (via UniConvertor) works AFAICT
> with 0.92 as before with 0.91.

Clarification: that refers to usage (quick roundtrip) in Inkscape:
1. open new document (px-based),
2. draw a path
3. save a copy as PLT
4. open just saved PLT file in Inkscape

jazzynico (jazzynico) wrote :

su_v> Confirm what exactly?

That it's also broken. But apparently not. So it's either a Ubuntu packaging issue with python-uniconvertor, or a local issue.
Thanks for your tests!

jazzynico (jazzynico) wrote :

Just to confirm it's a known issue with the Ubuntu package. See Bug #1597322 "necessary sk1libs isn't packaged".

jazzynico (jazzynico) wrote :

Gettext initialization (see comment #3) fixed in lp:inkscape rev. 15430 and lp:inkscape/0.92.x rev. 15328.

jazzynico (jazzynico) wrote :

Back to the original report, I suggest that we remove the Uniconvertor related features in the Windows packages (by removing the inx files from the share/extensions folder) until we find a replacement.

jazzynico (jazzynico) wrote :

...and add a line in the release notes to warn users that it no longer works on Windows.

summary: - The new version of Inkscape this Introducing Problems to open or SAVE
- .PLT files
+ Inkscape 0.92 can't open or save .plt files
Patrick Storz (ede123) wrote :

> I suggest that we remove the Uniconvertor related features in the Windows packages
When removing the uniconvertor and sk1libs modules from the devlibs (or rather not re-adding them after updating Python as there's no version for Python 2.7) I considered removing the *.inx, too, or at least updating the dependencies in the .inx to prevent it from showing up on Windows.

However I chose to keep it so people will get instructions on how to obtain the standalone version and are not surprised by missing functionality (who reads release notes ;-) ).
At that time I also tested it myself: Following the instructions in the error message, installing the standalone version of Uniconvertor and then installing the updated *.inx worked just fine and allowed to use Univonvertor in Inkscape 0.92.

jazzynico (jazzynico) wrote :

@Eduard, so you needed to update the .inx manually?

Patrick Storz (ede123) wrote :

Yes, after installing the standalone version, there's an updated .inx file in the installation folder. They also offer a VisualBasic script that allows to automatically update an already present Inkscape installation, but that step has still to be done manually.

It's badly documented, but it's not really our job to change something about that, is it?

jazzynico (jazzynico) wrote :

Ok, maybe I should give UC a second change and try to install the standalone version...
That said, there are *lots* of online or offline PLT<->SVG convertors, so I guess it should not be too hard to implement internally. One possibility could be to give a closer look to the UC code and see what we can extract from it.
Also, we already have extensions that import/export HPGL files and send data to plotters directly. I'm not a plotter format expert at all, but I wonder if we could use one of them to handle PLT files.

Alvin Penner (apenner) wrote :

I just tested the plt output from trunk, Windows 10, using the latest version of uniconv_output.py.

It directed me to the site:
http://sk1project.org/modules.php?name=Products&product=uniconvertor
I did not have much luck at this site, it is in Russian, had better luck at the alternate site:

https://sk1project.net/modules.php?name=Products&product=uniconvertor&op=download

jazzynico (jazzynico) wrote :

I'm going to update the sk1 link soon. Thanks Alvin!

TylerDurden (8thrule) wrote :

Thanks for the info on standalone and the patch. Seems I can now get a .plt to save and import back into Inkscape. :)

Odd thing, though... a 1000px*1000px rectangle path saved as .plt comes back into Inkscape at 1067.81*1076.81 (px).

Sugggestions?

Thanks,
TD

Win 8.1 64 bit, Inkscape 0.92.0 r15299

TylerDurden (8thrule) wrote :

*Correction: 1066.67*1066.67 (px). I had the stroke unset on the .plt in Inkscape.

Alvin Penner (apenner) wrote :

the value 1066.67 happens to be the same as 96/90 which corresponds to the change that was recently made in the Inkscape internal dpi.
Was your original svg file originally created in Inkscape 0.92 or did it come from an earlier version? could you attach the original svg file?

TylerDurden (8thrule) wrote :

Made the original svg with 0.92.

Here it is.

Thanks!

Alvin Penner (apenner) wrote :

thanks. sorry, I guess I should have asked for this up-front. Could you also attach the plt file you got as well as the svg file you got when you read the plt file back in? Inkscape does not actually get involved in the actual conversion process here, it simply calls uniconverter. So it is not likely that this will be fixable in Inkscape. But it might be worthwhile to see whether the error occurred on output or on input.

Failing that, there is a uniconverter website where you can report bugs, at:
https://sk1project.net/forum/viewforum.php?forum_id=6&rowstart=0

TylerDurden (8thrule) wrote :

Sorry for the delayed reply.

Here's the .plt file.

Also might be worth noting that the .py files I see in my UC patch are dated 2010...

Regards,
TD

Alvin Penner (apenner) wrote :

thanks for the plt file. I'm printing it here just for reference.
IN;PU0,11289;PD11289,11289;PD11289,0;PD0,0;PD0,11289;PU;

so 1000 pixels got converted to 11289 units in the plt file. In the plt file, as in hpgl, it is fairly common to use a base unit of 1/40 mm., which comes quite close to one thousandth of an inch. To be exact, 1 inch = 25.4*40 = 1016 plt units. If we now assume that the original Inkscape px unit was at 90 dpi, then 1000 px = 11.1111 inch = 11288.88 plt units which is consistent with what your file shows.
    So it looks as if 90 dpi was implicitly assumed somewhere in the conversion, which is currently wrong. However I don't think this was done in Inkscape because Inkscape just calls uniconverter directly without actually modifying the data in any way. So I think the best thing to do would be submit a bug report at the uniconverter site, at:
https://sk1project.net/forum/viewforum.php?forum_id=6&rowstart=0
sorry I could not be of any help...

TylerDurden (8thrule) wrote :

Thanks for taking a look!

I've added an issue at github (sk1 forum may be obsolete?):
https://github.com/sk1project/sk1-wx/issues/44

In the meantime, we'll scale in Inkscape prior to conversion, unless there are other suggestions?

Regards,
TD

Hachmann (marenhachmann) wrote :

@jazzynico: maybe unrelated, but I get the same error message when trying to import a .cgm file - so I also don't have that module installed on LM18.

jazzynico (jazzynico) wrote :

@Maren - It's related because Inkscape also uses Unicovertor to export to PLT, WMF and SK1, and import from SK1, PLT, CDT, WMF, CMX, CDR, CGM, CCX and AI formats.

Note that for the Corel Draw import formats we use libcdr by default (Uniconvertor imports are postfixed UC in the formats list).

TylerDurden (8thrule) wrote :

Just got word from SK1 devs that an update is issued:

"@8thrule @raboof we have added optional parameter for svg processing: --svg_dpi Default value is 90, but you can use 96 to resolve issue.

uniconvertor file.svg file.plt --svg_dpi=96
Hope this fix the issue. You may test changes using uniconvertor night builds:"

https://github.com/sk1project/sk1-wx/issues/44#issuecomment-457963940

TD

TylerDurden (8thrule) wrote :
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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