Dear Paul

On 05/14/2013 03:05 PM, Paul Schwenn wrote:

I made a Tools Plugin that creates xy plots and dataset names with utf-8
symbols. This works fine if I run from source with encoding set to UTF-8
in eclipse (Windows 7). However, it fails if I run the plugin from Veusz
installed with veusz-1.17.1.win32-py2.7.exe.

    UnicodeEncodeError: 'ascii' codec can't encode character u'\u0394'
    in position 4: ordinal not in range(128)

Have you tried the official binary?
http://download.gna.org/veusz/Binaries-Windows/veusz-1.17.1-windows-setup.exe

I assume that you're using something like the following at the top of your file?
# coding: utf-8

I would like to distribute the Tool Plugin and Veusz to others who don't
have python installed. So I thought I could rebuild the installer using
pyinstaller-2.0 (If that was used to generate the windows installer).

I found a few pyinstaller '.spec' files on github
(https://github.com/jeremysanders/veusz) but they don't seem to work.

Can someone please build the installer for Veusz 1.17.1 with utf-8
encoding, or suggest how to get pyinstaller to work with the veusz source?

Is there another way to create the windows installer from source with
encoding set to UTF-8?

This should work, as Veusz does have some Unicode source code already (e.g. widgets/polar.py) and is distributed with pyinstaller.

I remember it was a bit difficult to get pyinstaller to work properly. I had to remove the python3 parts of PyQt to get it to package correctly. You also need a working compiler in Windows.

If you send me the error logs it might help fix the problem. I could send you my pyinstaller directory. I don't remember what version I'm using without investigating. I believe the .spec file is up to date in the github repository.

Jeremy


_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss

Répondre à