yahoo-groups-backup icon indicating copy to clipboard operation
yahoo-groups-backup copied to clipboard

AttributeError: 'list' object has no attribute 'apply'

Open imfatant opened this issue 8 years ago • 1 comments

Solved one issue, and now another. Still trying to dump a site. Any ideas? Here's the output:

$ ./yahoo-groups-backup.py dump_site jokes_and_stories jas_test Rendering templates... Rendering config file... Rendering index data... Traceback (most recent call last): File "./yahoo-groups-backup.py", line 129, in main() File "./yahoo-groups-backup.py", line 125, in main arguments, cfg_args) File "./yahoo-groups-backup.py", line 103, in invoke_subcommand return module.command(args) File "/home/bo/yahoo-groups-backup/yahoo_groups_backup/subcommands/dump_site.py", line 334, in command ds.run() File "/home/bo/yahoo-groups-backup/yahoo_groups_backup/subcommands/dump_site.py", line 318, in run self.render_index() File "/home/bo/yahoo-groups-backup/yahoo_groups_backup/subcommands/dump_site.py", line 246, in render_index for message in self.db.yield_all_messages(start=self.redact_before) File "/home/bo/yahoo-groups-backup/yahoo_groups_backup/subcommands/dump_site.py", line 246, in for message in self.db.yield_all_messages(start=self.redact_before) File "/home/bo/yahoo-groups-backup/yahoo_groups_backup/subcommands/dump_site.py", line 232, in apply_redactions return self.redactions.apply(text) AttributeError: 'list' object has no attribute 'apply'

imfatant avatar Oct 12 '17 16:10 imfatant

It's because in yahoo_groups_backup/subcommands/dump_site.py, DumpSite.redactions is mistakenly initialized to an empty list if no --redactions= argument is provided, instead of a real instance of Redactions. So either provide a redactions yaml file (there's an example template in the root), or edit dump_site.py to add a line: from yahoo_groups_backup.redaction import Redactions And change: self.redactions = [] to: self.redactions = Redactions([])

chapatt avatar Jan 22 '19 21:01 chapatt