Re: Win32All Crashes Python 2.3?

Discussion in 'Python' started by Mark Hammond, Aug 6, 2003.

  1. Mark Hammond

    Mark Hammond Guest

    Roger Upole wrote:
    > I get the same thing on Win2k, Python 2.3 anytime a unicode string is
    > passed to os.lstat (without invoking any win32all modules)
    > ...
    > Looks like the problem is in posixmodule.c
    > PyUnicodeObject *po;
    > if (PyArg_ParseTuple(args, wformat, &po)) {
    > wformat at run time is "u:lstat", which should have
    > a unicode pointer for the receiving argument, not a PyUnicodeObject.
    > os.stat (which works for a unicode string) uses uppercase U in the format.


    Nice spot! I opened http://www.python.org/sf/783882 then fixed it on
    both the 2.3 maint branch (so it will appear in 2.3.1) and on the trunk
    (for 2.4)

    Mark.
     
    Mark Hammond, Aug 6, 2003
    #1
    1. Advertising

  2. Mark Hammond

    Tim Daneliuk Guest

    Roger Upole wrote:

    > I get the same thing on Win2k, Python 2.3 anytime a unicode string is
    > passed to os.lstat (without invoking any win32all modules)


    This may well be my problem as well since the routine in question
    sometimes gets passed a unicode string, and sometimes not ...
    (I think) ...

    > ...
    > Looks like the problem is in posixmodule.c
    > PyUnicodeObject *po;
    > if (PyArg_ParseTuple(args, wformat, &po)) {
    > wformat at run time is "u:lstat", which should have
    > a unicode pointer for the receiving argument, not a PyUnicodeObject.
    > os.stat (which works for a unicode string) uses uppercase U in the format.
    >
    > Roger
    >
    >
    > "Tim Daneliuk" <> wrote in message
    > news:...
    >
    >>Some time ago I wrote a portable file system browser, twander, that,
    >>when runnning on Win32, will make use of the Win32All extensions if they
    >>are present on the target system.

    >
    > (http://www.tundraware.com/Software/twander)
    >
    >>twander primarily uses Win32All to get file attribute and ownership
    >>information back in Win32-specific ways each time a new directory is
    >>entered. (Ordinarily (if Win32All is not installed), it just displays an
    >>'ls -al' style output and dummies up ownership and group membership.)
    >>
    >>Now the problem - twander has worked fine with previous versions of
    >>Python/Win32All up to and including 2.2.x. It also works fine
    >>with 2.3. HOWEVER, if I install any of the 2.3 relevant versions
    >>of Win32All, when I change to a new directory, Python crashes.
    >>No traceback information is given so I cannot determine exactly
    >>why this is happening. What is strange is that the program
    >>starts OK, which means it is using Win32All calls to determine
    >>file system information for the initial directory. It is only
    >>upon changing directories that Python gets blown out of the water.
    >>
    >>While it is certainly possible that this is a bug in my code, I
    >>cannot imagine what it might be. The program has worked flawlessly
    >>on a wide variety of Unix/FreeBSD/Win32 systems with no reports
    >>of this sort of thing.
    >>
    >>Anyone have any ideas what could cause this? Is this a reported
    >>Win32All bug?
    >>
    >>TIA,
    >>--------------------------------------------------------------------------

    >
    > --
    >
    >>Tim Daneliuk
    >>PGP Key: http://www.tundraware.com/PGP/
    >>

    >
    >
    >



    --
    ----------------------------------------------------------------------------
    Tim Daneliuk
    PGP Key: http://www.tundraware.com/PGP/
     
    Tim Daneliuk, Aug 6, 2003
    #2
    1. Advertising

  3. Mark Hammond

    Roger Upole Guest

    I get the same thing on Win2k, Python 2.3 anytime a unicode string is
    passed to os.lstat (without invoking any win32all modules)
    ...
    Looks like the problem is in posixmodule.c
    PyUnicodeObject *po;
    if (PyArg_ParseTuple(args, wformat, &po)) {
    wformat at run time is "u:lstat", which should have
    a unicode pointer for the receiving argument, not a PyUnicodeObject.
    os.stat (which works for a unicode string) uses uppercase U in the format.

    Roger


    "Tim Daneliuk" <> wrote in message
    news:...
    > Some time ago I wrote a portable file system browser, twander, that,
    > when runnning on Win32, will make use of the Win32All extensions if they
    > are present on the target system.

    (http://www.tundraware.com/Software/twander)
    >
    > twander primarily uses Win32All to get file attribute and ownership
    > information back in Win32-specific ways each time a new directory is
    > entered. (Ordinarily (if Win32All is not installed), it just displays an
    > 'ls -al' style output and dummies up ownership and group membership.)
    >
    > Now the problem - twander has worked fine with previous versions of
    > Python/Win32All up to and including 2.2.x. It also works fine
    > with 2.3. HOWEVER, if I install any of the 2.3 relevant versions
    > of Win32All, when I change to a new directory, Python crashes.
    > No traceback information is given so I cannot determine exactly
    > why this is happening. What is strange is that the program
    > starts OK, which means it is using Win32All calls to determine
    > file system information for the initial directory. It is only
    > upon changing directories that Python gets blown out of the water.
    >
    > While it is certainly possible that this is a bug in my code, I
    > cannot imagine what it might be. The program has worked flawlessly
    > on a wide variety of Unix/FreeBSD/Win32 systems with no reports
    > of this sort of thing.
    >
    > Anyone have any ideas what could cause this? Is this a reported
    > Win32All bug?
    >
    > TIA,
    > --------------------------------------------------------------------------

    --
    > Tim Daneliuk
    > PGP Key: http://www.tundraware.com/PGP/
    >
     
    Roger Upole, Aug 6, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin v. =?iso-8859-15?q?L=F6wis?=

    Re: Win32All Crashes Python 2.3?

    Martin v. =?iso-8859-15?q?L=F6wis?=, Aug 5, 2003, in forum: Python
    Replies:
    2
    Views:
    328
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Aug 5, 2003
  2. Tim Daneliuk

    Re: Win32All Crashes Python 2.3?

    Tim Daneliuk, Aug 7, 2003, in forum: Python
    Replies:
    1
    Views:
    310
    Tim Daneliuk
    Aug 7, 2003
  3. Brent Turner
    Replies:
    0
    Views:
    305
    Brent Turner
    Sep 29, 2003
  4. Reinhard Koenig
    Replies:
    5
    Views:
    533
    Reinhard Koenig
    Nov 17, 2003
  5. Tom Semple

    Python+win32all on win95?

    Tom Semple, Nov 18, 2003, in forum: Python
    Replies:
    0
    Views:
    374
    Tom Semple
    Nov 18, 2003
Loading...

Share This Page