zepheira / pybibframe

Open-source tools for working with BIBFRAME (see: http://bibframe.org), by default BIBFRAME Lite (see: http://bibfra.me) and more generally Library Linked Data. For some background thoughts see: https://medium.com/library-link-network/libraries-jet-fuel-and-the-information-age-8b28d5eb1339
Apache License 2.0
23 stars 13 forks source link

marc2bf hangs on conversion #3

Closed jgreben closed 10 years ago

jgreben commented 10 years ago

When I try to convert a single marcxml record (https://gist.github.com/jgreben/99b0c895dfdca43c028e) using marc2bf, it hangs, and then produces the error message below after issuing a KeyboardInterrupt:

File "/usr/local/bin/marc2bf", line 60, in run(inputs=args.inputs or sys.stdin, base=args.base, out=args.out, limit=args.limit, rdfttl=args.rdfttl, config=args.config, verbose=args.verbose, mods=args.mod) File "/usr/local/bin/marc2bf", line 30, in run bfconvert(inputs=inputs, base=base, out=out, limit=limit, rdfttl=rdfttl, config=config, verbose=verbose, logger=logger) File "/usr/local/lib/python3.3/site-packages/bibframe/reader/marcxml.py", line 158, in bfconvert loop.run_forever() File "/usr/local/lib/python3.3/site-packages/asyncio/base_events.py", line 184, in run_forever self._run_once() File "/usr/local/lib/python3.3/site-packages/asyncio/base_events.py", line 795, in _run_once event_list = self._selector.select(timeout) File "/usr/local/lib/python3.3/site-packages/asyncio/selectors.py", line 424, in select fd_event_list = self._epoll.poll(timeout, max_ev) KeyboardInterrupt

jgreben commented 10 years ago

So when I send the process to the background I am able to generate the versa.json without problems, but the problem still occurs when I try to generate RDF Turtle. The process never seems to finish.

Using: marc2bf -o resources.versa.json -r resources.ttl stfsmall.mrx &

-rw-r--r-- 1 jgreben users 0 Aug 4 10:49 resources.ttl -rw-r--r-- 1 jgreben users 837441 Aug 4 10:49 resources.versa.json

[jgreben~pybibframe]$ ps -ef | grep marc2bf jgreben 5000 3327 1 10:49 pts/1 00:00:03 /usr/local/bin/python3.3 /usr/local/bin/marc2bf -o resources.versa.json -r resources.ttl stfsmall.mrx jgreben 5064 3327 0 10:55 pts/1 00:00:00 grep marc2bf

uogbuji commented 10 years ago

There was an old bug along these lines, which I thought was fixed, but there might be a regression in the current package. Several of us have done a fair bit of testing today, and are about to release a new package which one way or another should clear this up.

uogbuji commented 10 years ago

New version 0.4.1 packaged & uploaded to PyPI.