#13 Open file doesn't

closed-fixed
nobody
None
9
2004-04-22
2004-04-21
John Bell
No

DrPython version 2.4.5
Try to open a file (any file) and all I get is the
"busy" cursor. No file is ever opened in the editor.

Discussion

  • Logged In: YES
    user_id=796750

    This is a very serious bug.
    I need some more info.

    What OS are you on? What version of python? What version of
    wxPython? Have you tried cvs? Does that work?

    What kind of file are you opening? Are you opening one
    file, or more than one? Are you in MDI(tabs) mode? What
    encoding is selected as default in your prefs?

    Can you send me a copy of a file that is not working?

     
    • priority: 5 --> 9
    • status: open --> open-accepted
     
  • John Bell
    John Bell
    2004-04-22

    Logged In: YES
    user_id=347890

    It doesn't seem to matter what the file is. I've tried
    everything from 80k to 2 bytes, different directories, etc.
    I've set it to MDI checked and not. Encoding Ascii,
    default. You name it I think I've tried it.

    Haven't tried the cvs version. Haven't had time to dig my
    way through the horrendously inept cvs documentation yet.
    Got a cvs ebuild handy? :)

    Machine:
    P4 2.2
    512 MB

    OS:
    Linux - Gentoo 2.4.22
    wxPython - 2.4.2.4
    wxGTK - 2.4.2
    Python - 2.3.3

    Need anything else?

     
  • John Bell
    John Bell
    2004-04-22

    Logged In: YES
    user_id=347890

    Ok, just downloaded (through webcvs) the cvs version. It
    has the same problem. Ran it from konsole, got this when
    trying to open a file:

    Traceback (most recent call last):
    File "/netdl/cvsroot/drpython/drpython.py", line 2213, in
    OnOpen
    self.OpenFile(False)
    File "/netdl/cvsroot/drpython/drpython.py", line 3100, in
    OpenFile
    self.SetEncodedText(self.txtDocument, oof)
    File "/netdl/cvsroot/drpython/drpython.py", line 3363, in
    SetEncodedText
    sText=unicode(text, encoding).encode(self.encodings[0])
    #convert utf-8 encoding to default encoding
    TypeError: unicode() argument 2 must be string, not None

    Tried encoding at Ascii and UTF-8, same output.

    Hope that helps.

     
    • status: open-accepted --> closed-fixed
     
  • Logged In: YES
    user_id=796750

    Gotcha.

    This should be fixed in cvs (I will re-open if it is not).
    I caught the exception around line 3363, and I put in code
    to handle no default encoding (which is what your traceback
    shows you have). self.encodings[0] is
    locale.getdefaultlocale()[1].
    So I set this to "ascii" if it is none.

    check the Changlog to make sure you have the latest version
    from cvs.

    Cheers