Bugs item #1362587, was opened at 2005-11-21 08:44
Message generated for change (Comment added) made by gustaebel
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1362587&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 7
Submitted By: Henrik (esshenrik)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problem with tapedevices and the tarfile module

Initial Comment:
Problem to read a archive from tape that was created 
with the tarfile module in python.

Error:
>>> tar = tarfile.open("/dev/st0", "r")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.4/tarfile.py", line 
916, in open
    return func(name, "r", fileobj)
  File "/usr/local/lib/python2.4/tarfile.py", line 
933, in taropen
    return cls(name, mode, fileobj)
  File "/usr/local/lib/python2.4/tarfile.py", line 
811, in __init__
    fileobj = file(self.name, self.mode)
IOError: [Errno 16] Device or resource 
busy: '/dev/st0'


I was creating the archive with succes:
>>> tar.close()
>>> tar = tarfile.open("/dev/st0", "w")
>>> tar.add("/tmp/bin1.tar")
>>> tar.add("/tmp/bin2.tar")
>>> tar.close()
>>>

When I try to read the tape without pyton the 
folowing error:
[EMAIL PROTECTED] tmp]# tar tvbf 20 /dev/st0
tar: Record size = 8 blocks
-rw-r--r-- root/root 128614400 2005-11-20 19:53:11 
tmp/bin1.tar
tar: /dev/st0: Cannot read: Cannot allocate memory
tar: /dev/st0: Cannot read: Cannot allocate memory
tar: /dev/st0: Cannot read: Cannot allocate memory
tar: /dev/st0: Cannot read: Cannot allocate memory
tar: /dev/st0: Cannot read: Cannot allocate memory
tar: /dev/st0: Cannot read: Cannot allocate memory
tar: /dev/st0: Cannot read: Cannot allocate memory
......

Can anyone help me with this problem or have another 
module for tarfile that works with tapedevices?

/Henrik 


----------------------------------------------------------------------

Comment By: Lars Gustäbel (gustaebel)
Date: 2005-11-21 09:40

Message:
Logged In: YES 
user_id=642936

Could try and use tarfile's stream interface for writing and
reading and see if that works? Just append a pipe symbol to
the mode, e.g.:

tar = tarfile.open("/dev/st0", "w|")

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1362587&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to