indexing marc records

1 view
Skip to first unread message

...

unread,
Oct 14, 2010, 3:12:28 PM10/14/10
to koc...@googlegroups.com

Hey, I went to the library of congress and downloaded a file with 20-50 marc records in it.  (just searched for shakespeare, clicked as many boxes as I had patience for and the saved the marc records).  I got unicode/UTF8 and (when that didn't work) I tried non-unicode/MARC8 and I changed the extension from .cgi to .mrc. 

For both types I got an error very much like this:

elbiot@elbitop:~/code/library/kochief/kochief/kochief$ python manage.py index /home/elbiot/code/library/MARC/Pwebrecon.mrc
Converting /home/elbiot/code/library/MARC/Pwebrecon.mrc to CSV ...
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/var/lib/python-support/python2.6/django/core/management/__init__.py", line 340, in execute_manager
    utility.execute()
  File "/var/lib/python-support/python2.6/django/core/management/__init__.py", line 295, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/var/lib/python-support/python2.6/django/core/management/base.py", line 192, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/var/lib/python-support/python2.6/django/core/management/base.py", line 219, in execute
    output = self.handle(*args, **options)
  File "/home/elbiot/code/library/kochief/kochief/kochief/../kochief/discovery/management/commands/index.py", line 79, in handle
    record_count = module.write_csv(data_handle, csv_handle)
  File "/home/elbiot/code/library/kochief/kochief/kochief/../kochief/discovery/parsers/marc.py", line 476, in write_csv
    (count, marc_record.title().encode('ascii', 'ignore')))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xca in position 5: ordinal not in range(128)

Reply all
Reply to author
Forward
0 new messages