Unicode Decode Error on WinXP Boa 0.6.1

Help
2008-08-14
2013-05-01
  • Thomas Fries

    Thomas Fries - 2008-08-14

    Hello,
    I am new to Boa Constructor.
    Under the configuration.
    ------------------
    WinXP SP2
    Python 2.5.2
    WXPython 2.8.8.1 (Unicode type)
    BoaCtructor 0.6.1
    ------------------
    I can start Boa, but when I try to save a
    file in the Editor there is an error.
    The error comes while navigating in the save under dialog.

    Error:
    UnicodeDecodeError: 'ascii' codec can't decode 0xf6 in position 1: ordinal not in range(128)

    Details:
    File "FileDlg.pyc", line 382, in OnOpen
    File "FileDlg.pyc", line 459, in ok
    File "FileDlg.pyc", line 365, in open
    File "FileDlg.pyc", line 288, in updatePathLabel
    UnicodeDecodeError: 'ascii' codec can't decode 0xf6 in position 1: ordinal not in range(128)

    So running Boa is not possible.

    I installed a file sitecustomize.py
    in C:\Programme\BoaConstructor like:
    -------------
    import sys
    sys.setdefaultencoding('iso-8859-1')
    -------------
    but this didn't help.
    Has someone an idea how I can fix this problem to run Boa.

    Thanks in advance.

     
    • Werner F. Bruhin

      sitecustomize.py needs to be in your python folder, i.e. I have it in c:/python25 and I set encoding to utf-8.

      I am on Vista but that should not matter.

      With above there are in very rare occasions still issues with encoding, which one day I really have to document/trace down reason as otherwise they will never get fixed.

      Werner

       
    • Thomas Fries

      Thomas Fries - 2008-08-14

      Thanks,
      but put the Sitecustomize.py in Python25 (root),
      but this didn't word neither with utf-8 nor with iso-8859-1.

       
      • Werner F. Bruhin

        Are you using boa.py to start Boa or boa.exe?

        What do you get when you do the following in the Boa shell?

        import sys
        >>> sys.getdefaultencoding()

        What language are you running XP in?  Are the files and folders you are working with having special characters in their names?

        Werner

         
        • Thomas Fries

          Thomas Fries - 2008-08-14

          I use WinXP SP3 in German.
          Also if I select in the dialog a direcory which is empty the error
          occures. Allways climbing down the dir-Tree.

           
        • Thomas Fries

          Thomas Fries - 2008-08-14

          I use boa.exe.
          Haven't used boa shell yet.
          Il will try it.

           
          • Werner F. Bruhin

            That is your problem.

            boa.exe is compiled with py2exe which means it comes with its version of wxPython and Python.

            If you want to develop with Boa I recommend NOT to use the boa.exe version as it is just to limiting.

            The best thing is to get the CVS version or use the source installer.

            http://dfn.dl.sourceforge.net/sourceforge/boa-constructor/boa-constructor-0.6.1.src.win32.exe

            Werner

             
            • Thomas Fries

              Thomas Fries - 2008-08-14

              That worked.
              Uninstalling the boa.exe, installing the boa sources and running boa.py
              removed the error. That means the uncompability between compiled boa.exe and
              other (newer) versions of wxpython .. may result in an error.
              Even no siteconfiguration (utf-8 .. )was necessary.
              Thank you very much.

              If possible inform other user, that they don't run in this error.
              Greetings wom

               
              • Werner F. Bruhin

                Gut dass es jetzt funktioniert!

                This list and the one on gmane (gmane.comp.ide.boa-constructor.user) should be checked whenever one has an issue with Boa.

                Another very good list is the wxPython/users list, extremely helpful!

                Werner

                 
                • Thomas Fries

                  Thomas Fries - 2008-08-15

                  Sorry another problem occures.
                  I could run boa.py only one time.
                  When I try to start is a second time
                  python boa.py fails.

                  C:\Programme\Python25\Lib\site-packages\boa-constructor>python boa.py
                  Starting Boa Constructor v0.6.1
                  importing wxPython
                  reading user preferences
                  Traceback (most recent call last):
                    File "boa.py", line 271, in <module>
                      import Preferences, Utils
                    File "C:\Programme\Python25\Lib\site-packages\boa-constructor\Preferences.py",
                  line 174, in <module>
                      c = wx.FileConfig(localFilename=file, style= wx.CONFIG_USE_LOCAL_FILE)
                    File "C:\Programme\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_misc.py",
                  line 3313, in __init__
                      _misc_.FileConfig_swiginit(self,_misc_.new_FileConfig(*args, **kwargs))
                  wx._core.PyNoAppError: The wx.App object must be created first!

                  What can I do

                   
                • Thomas Fries

                  Thomas Fries - 2008-08-15

                  I made a test.
                  I installed wxPython and boa as a new installation.
                  Then I started python boa.py in boa's directory.
                  It works ! I finished boa
                  When I start boa again, then i fails with a traceback,
                  as shown before.

                   
                • Thomas Fries

                  Thomas Fries - 2008-08-15

                  I saw a fews messages
                  the topic BOA startup problems describes this problem.
                  Changing preferences.py solved the problem.
                  Thanks

                   
    • Thomas Fries

      Thomas Fries - 2008-08-14

      This error is not an rare occasion. This error is on all of my three PCs
      with this configuration.
      The configuration is in my view a standard configuration,
      which meens I fetched the newest versions of python, wxpython and boa constructor.

       
    • Thomas Fries

      Thomas Fries - 2008-08-14

      The error occures when I climb up in the dialog save under in the directory selection up the file tree
      and want to climb down in a certain directory.

       
      • Werner F. Bruhin

        I just tried these steps and they work for me on Vista with French version of OS.

        I also just did a test and removed my sitecustomize.py, and I still don't see the error you get.

        What do you see when you do the following in Boa shell:
        import sys
        >>> sys.getdefaultencoding()
        'ascii'
        >>> sys.getfilesystemencoding()
        'mbcs'

        Werner

         

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks