python launch problem

  • Mike Gaughan

    Mike Gaughan - 2005-02-23

    Morning All,

    I am having a problem launching python from Eclipse. I get the following error when invoking Run->Run

    sys:1: DeprecationWarning: Non-ASCII character '\x90' in file C:\Python24\python.exe on line 1, but no encoding declared; see for details
      File "C:\Python24\python.exe", line 1
        MZ�$,000$0 0
    SyntaxError: invalid syntax

    I am running Eclipse 3.0.1 - Python 2.4 - Windows XP

    Thanks in advance,

    Mike Gaughan

    • Fabio Zadrozny

      Fabio Zadrozny - 2005-02-23

      I don't believe this is a valid python syntax you're using in your file, so, the error would happen even if you call it from python (it's not a problem in eclipse nor pydev, but in your source file).



    • François Granger

      Since it is a warning, your script should run anyway.
      You must put the following two lines at the biggining of your file.

      #!/usr/bin/env python
      # -*- coding: utf-8 -*-

      Be sur to save your file as UTF-8 with no BOM.
      This is a Python issue, not a PyDev one.

    • donarin

      donarin - 2005-03-07

      I think, the new way of enabling language coding in Python  - see the mail from Francois - is a fast perfect way. The only problem with this is, we must know the current setting in out environment. My is Latin, so I have to set another value here, not UTF-8.

      I hope, there will be a time, when we may ask our system to tell the actual coding, and this without any special crytic knowledge, what is needed now.