SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
TypeError: unsubscriptable object (cfile[creator])
Author Message
Post TypeError: unsubscriptable object (cfile[creator]) 
Hello,

I just learned about and installed rdiff-backup yesterday. I tried to
run the command:

sudo rdiff-backup -v4 --exclude /dev --exclude /tmp --exclude /Volumes
--exclude /.Spotlight-V100 --exclude /automount --exclude /private/tmp
--exclude /Network --exclude /private/var/run / /Volumes/Mirror

and this is the output I received after it ran for a while (it copied
nearly 9 GB before halting):

Unable to import module xattr.
Extended attributes not supported on filesystem at /
Unable to import module posix1e from pylibacl package.
ACLs not supported on filesystem at /
-----------------------------------------------------------------
Detected abilities for source (read only) file system:
Access control lists Off
Extended attributes Off
Mac OS X style resource forks On
Mac OS X Finder information On
-----------------------------------------------------------------
Unable to import module xattr.
Extended attributes not supported on filesystem at
/Volumes/Mirror/rdiff-backup-data/rdiff-backup.tmp.0
Unable to import module posix1e from pylibacl package.
ACLs not supported on filesystem at
/Volumes/Mirror/rdiff-backup-data/rdiff-backup.tmp.0
-----------------------------------------------------------------
Detected abilities for destination (read/write) file system:
Characters needing quoting '^a-z0-9_ -.'
Ownership changing On
Hard linking On
fsync() directories On
Directory inc permissions On
Access control lists Off
Extended attributes Off
Mac OS X style resource forks On
Mac OS X Finder information On
-----------------------------------------------------------------
Starting mirror / to /Volumes/Mirror
UpdateError System/Library/Modem Scripts/Apple Internal 56K Modem (v.32)
Updated mirror temp file /Volumes/Mirror/;083ystem/;076ibrary/;077odem
;083cripts/rdiff-backup.tmp.322136 does not match source
UpdateError System/Library/Modem Scripts/Apple Internal 56K Modem (v.34)
Updated mirror temp file /Volumes/Mirror/;083ystem/;076ibrary/;077odem
;083cripts/rdiff-backup.tmp.322137 does not match source
UpdateError System/Library/Modem Scripts/Apple Internal 56K Modem (v.90)
Updated mirror temp file /Volumes/Mirror/;083ystem/;076ibrary/;077odem
;083cripts/rdiff-backup.tmp.322138 does not match source
UpdateError System/Library/Modem Scripts/Apple Internal 56K Modem (v.92)
Updated mirror temp file /Volumes/Mirror/;083ystem/;076ibrary/;077odem
;083cripts/rdiff-backup.tmp.322139 does not match source
Traceback (most recent call last):
File "/sw/bin/rdiff-backup", line 23, in ?
rdiff_backup.Main.Main(sys.argv[1:])
File "/sw/lib/python2.4/site-packages/rdiff_backup/Main.py", line
282, in Main
take_action(rps)
File "/sw/lib/python2.4/site-packages/rdiff_backup/Main.py", line
252, in take_action
elif action == "backup": Backup(rps[0], rps[1])
File "/sw/lib/python2.4/site-packages/rdiff_backup/Main.py", line
305, in Backup
backup.Mirror(rpin, rpout)
File "/sw/lib/python2.4/site-packages/rdiff_backup/backup.py", line
38, in Mirror
DestS.patch(dest_rpath, source_diffiter)
File "/sw/lib/python2.4/site-packages/rdiff_backup/backup.py", line
218, in patch
ITR(diff.index, diff)
File "/sw/lib/python2.4/site-packages/rdiff_backup/rorpiter.py", line
279, in __call__
last_branch.fast_process(*args)
File "/sw/lib/python2.4/site-packages/rdiff_backup/backup.py", line
476, in fast_process
if self.patch_to_temp(rp, diff_rorp, tf):
File "/sw/lib/python2.4/site-packages/rdiff_backup/backup.py", line
503, in patch_to_temp
rpath.copy_attribs(diff_rorp, new)
File "/sw/lib/python2.4/site-packages/rdiff_backup/rpath.py", line
160, in copy_attribs
rpout.write_carbonfile(rpin.get_carbonfile())
File "/sw/lib/python2.4/site-packages/rdiff_backup/rpath.py", line
1146, in write_carbonfile
finderinfo.Creator = cfile['creator']
TypeError: unsubscriptable object
Exception exceptions.TypeError: "'NoneType' object is not callable" in
<bound method GzipFile.__del__ of <gzip open file
'/Volumes/Mirror/rdiff-backup-data/file_statistics.2005-10-02;08401;05821;05819-04;05800.data.gz',
mode 'wb' at 0x10aa0b0 0x10a9e40>> ignored
Exception exceptions.TypeError: "'NoneType' object is not callable" in
<bound method GzipFile.__del__ of <gzip open file
'/Volumes/Mirror/rdiff-backup-data/error_log.2005-10-02;08401;05821;05819-04;05800.data.gz',
mode 'wb' at 0x1088f98 0x10a9d00>> ignored
Exception exceptions.TypeError: "'NoneType' object is not callable" in
<bound method GzipFile.__del__ of <gzip open file
'/Volumes/Mirror/rdiff-backup-data/mirror_metadata.2005-10-02;08401;05821;05819-04;05800.snapshot.gz',
mode 'wb' at 0x10aa0f8 0x10a9e68>> ignored

-Ryan

Post TypeError: unsubscriptable object (cfile[creator]) 
Ryan Tarpine <rtarpine < at > cmu.edu>
wrote the following on Sun, 02 Oct 2005 11:19:36 -0400

I just learned about and installed rdiff-backup yesterday. I tried to
run the command:
...
Mac OS X style resource forks On
Mac OS X Finder information On
...
finderinfo.Creator = cfile['creator']
TypeError: unsubscriptable object

I assume you are running Mac OS X? It seems to be a problem with the
error-checking in the carbonfile code, but I'm not 100% sure since I
don't have any experience with that OS.

To whoever (John Goerzen?) wrote the get_carbonfile() function: maybe
it shouldn't catch the MacOS.error exception? It seems like it
catches it, and returns a bad cfile which write_carbonfile chokes on.


--
Ben Escoto

Post TypeError: unsubscriptable object (cfile[creator]) 
On 14 Oct 2005, at 22:50, Ben Escoto wrote:

Ryan Tarpine <rtarpine < at > cmu.edu>
wrote the following on Sun, 02 Oct 2005 11:19:36 -0400


I just learned about and installed rdiff-backup yesterday. I
tried to
run the command:

...

Mac OS X style resource forks On
Mac OS X Finder information On

...

finderinfo.Creator = cfile['creator']
TypeError: unsubscriptable object


I assume you are running Mac OS X? It seems to be a problem with the
error-checking in the carbonfile code, but I'm not 100% sure since I
don't have any experience with that OS.


It seems that with OS X 10.4 you need to use two switches:

--no-carbonfile --override-chars-to-quote ''

The second switch ends with two single quote characters. It might
only be necessary if you are backing up to and from the native HFS+
file system.

Kevin Horton
Ottawa, Canada

Post TypeError: unsubscriptable object (cfile[creator]) 
Kevin Horton <khorton01 < at > rogers.com>
wrote the following on Fri, 14 Oct 2005 23:16:18 -0400

It seems that with OS X 10.4 you need to use two switches:

--no-carbonfile --override-chars-to-quote ''

The second switch ends with two single quote characters. It might
only be necessary if you are backing up to and from the native HFS+
file system.

What if you add this patch:

--- rpath.py 2005-09-07 12:04:37.000000000 -0500
+++ rpath.py.new 2005-10-15 21:48:04.000000000 -0500
< at > < at > -1150,6 +1150,7 < at > < at >

def write_carbonfile(self, cfile):
"""Write new carbon data to self."""
+ if not cfile: return
log.Log("Writing carbon data to %s" % (self.index,), 7)
from Carbon.File import FSSpec
import MacOS

Do you still need to add --no-carbonfile, or does that fix that
problem?


--
Ben Escoto

Post TypeError: unsubscriptable object (cfile[creator]) 
On 15 Oct 2005, at 22:49, Ben Escoto wrote:

Kevin Horton <khorton01 < at > rogers.com>
wrote the following on Fri, 14 Oct 2005 23:16:18 -0400


It seems that with OS X 10.4 you need to use two switches:

--no-carbonfile --override-chars-to-quote ''

The second switch ends with two single quote characters. It might
only be necessary if you are backing up to and from the native HFS+
file system.


What if you add this patch:

--- rpath.py 2005-09-07 12:04:37.000000000 -0500
+++ rpath.py.new 2005-10-15 21:48:04.000000000 -0500
< at > < at > -1150,6 +1150,7 < at > < at >

def write_carbonfile(self, cfile):
"""Write new carbon data to self."""
+ if not cfile: return
log.Log("Writing carbon data to %s" %
(self.index,), 7)
from Carbon.File import FSSpec
import MacOS

Do you still need to add --no-carbonfile, or does that fix that
problem?

This patch seems to stop the crash. I did an incremental backup, and
now I get a bunch of UpdateErrors like this:

UpdateError Desktop/RV_Stuff/POH archive/graphs/all-3.gp Updated
mirror temp file /Volumes/Ext_BU/Users/kwh/rdiffbu/Desktop/RV_Stuff/
POH archive/graphs/rdiff-backup.tmp.7305 does not match source

The file listed in the first of these UpdateErrors was the one that
was causing the crash before I started using the --no-carbonfile
flag. I assume the backed up file would have included the carbonfile
data if that flag had not been used, and this is why rdiff-backup is
now complaining about the file not matching the source. Does this
make sense?


Kevin Horton
Ottawa, Canada

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB