TypeError: _getfullpathname() argument 1 must be (buffer overflow),not str in windows xp, while maki

Discussion in 'Python' started by Ryniek90, Aug 25, 2009.

  1. Ryniek90

    Ryniek90 Guest

    >
    > Ryniek90 wrote:
    >> Referring to my earlier posts:
    >> http://groups.google.pl/group/comp.lang.python/browse_thread/thread/4e34f995800f5352?hl=pl
    >>
    >>
    >> and
    >>
    >> http://groups.google.pl/group/comp.lang.python/browse_thread/thread/abf5573b8fceb37e?hl=pl#
    >>
    >>
    >> I've dealt with those errors. but now have another.
    >> When my backup scripts starts to backup chosen file, python gave me
    >> Traceback:
    >>
    >> "
    >> C:\Users\Ryniek's WinSe7en\Documents\My
    >> Dropbox\Aplikacje\Moje_aplikacje\Pythonowe_aplikacje\Skrypty>python ba
    >> ckuper.py -f F:\APLIKACJE\nowegg.exe F:\ MyGGBackup
    >> Checking permissions for reading and writing...
    >> Have permissions on [F:\APLIKACJE\nowegg.exe] for reading.
    >> Have permissions on [F:\] for writing.
    >> Preparing for backup [nowegg.exe]...
    >> Starting backup...
    >> Now adding [nowegg.exe]...
    >> Traceback (most recent call last):
    >> File "backuper.py", line 197, in <module>
    >> main_meth()
    >> File "backuper.py", line 189, in main_meth
    >> paq.backup_file(pars.options.filename[0],
    >> pars.options.filename[1], pars.options.filename[2])
    >> File "backuper.py", line 127, in backup_file
    >> backup_obj.add(read_bin_obj)
    >> File "E:\WinSe7en Apps\APLIKACJE\ActiveState Python
    >> 2.6\lib\tarfile.py", line 1948, in add
    >> if self.name is not None and os.path.abspath(name) == self.name:
    >> File "E:\WinSe7en Apps\APLIKACJE\ActiveState Python
    >> 2.6\lib\ntpath.py", line 458, in abspath
    >> path = _getfullpathname(path)
    >> TypeError: _getfullpathname() argument 1 must be (buffer overflow),
    >> not str
    >> "
    >>
    >> I've searched over google, but found only that is bug in Python (
    >> http://bugs.python.org/issue4071 - in that issue bug is inside
    >> Python 2.5.2 - i've got ActiveState Active Python with core Python
    >> 2.6.2), and another info: *http://tinyurl.com/lvyn7o and
    >> **http://tinyurl.com/kn49vk
    >> *
    >>
    >> Here's my script code:
    >> *http://paste.ubuntu.com/259310/
    >>
    >> *Shouldn't that bug be patched already :-?

    > Are you giving it the contents of the file when it's actually expecting
    > the filename?
    >
    >


    Of course the content of the file:
    "
    C:\Users\Ryniek's WinSe7en\Documents\My
    Dropbox\Aplikacje\Moje_aplikacje\Pythonowe_aplikacje\Skrypty>python ba
    ckuper.py -f F:\APLIKACJE\nowegg.exe F:\ MyGGBackup
    Checking permissions for reading and writing...
    Have permissions on [F:\APLIKACJE\nowegg.exe] for reading.
    Have permissions on [F:\] for writing.
    Preparing for backup [nowegg.exe]...
    Starting backup...
    Now adding [nowegg.exe]...
    Traceback (most recent call last):
    File "backuper.py", line 196, in <module>
    main_meth()
    File "backuper.py", line 188, in main_meth
    paq.backup_file(pars.options.filename[0], pars.options.filename[1],
    pars.options.filename[2])
    File "backuper.py", line 126, in backup_file
    backup_obj.add(read_obj.read())
    File "E:\WinSe7en Apps\APLIKACJE\ActiveState Python
    2.6\lib\tarfile.py", line 1948, in add
    if self.name is not None and os.path.abspath(name) == self.name:
    File "E:\WinSe7en Apps\APLIKACJE\ActiveState Python
    2.6\lib\ntpath.py", line 458, in abspath
    path = _getfullpathname(path)
    TypeError: _getfullpathname() argument 1 must be (buffer overflow), not str
    "

    See? *backup_obj.add(read_obj.read())*
    In previous pasted Traceback you can see *backup_obj.add(read_bin_obj)*
    - read_obj_bin was a reference to the *read_obj.read()* .

    Do only I have this problem or Python programming under Windows is
    nightmare?
     
    Ryniek90, Aug 25, 2009
    #1
    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. Manish Gupta (BBS)
    Replies:
    3
    Views:
    631
    Raymond L. Buvel
    Feb 19, 2005
  2. Fredrik Lundh
    Replies:
    0
    Views:
    525
    Fredrik Lundh
    Feb 17, 2005
  3. Ryniek90
    Replies:
    0
    Views:
    447
    Ryniek90
    Aug 25, 2009
  4. Ryniek90
    Replies:
    1
    Views:
    327
    Piet van Oostrum
    Aug 27, 2009
  5. Ryniek90
    Replies:
    1
    Views:
    519
    Piet van Oostrum
    Aug 27, 2009
Loading...

Share This Page