denshoproject / ddr-cmdln

Command-line tools for automating the Densho Digital Repository's various processes.
Other
0 stars 2 forks source link

ddr-filter fails with KeyError #39

Closed GeoffFroh closed 8 years ago

GeoffFroh commented 8 years ago

ddr-filter on ddr-local/ddr-cmdln latest master. I've confirmed the same issue on two separate VMs (kinkura, dragontail) with two different repos (ddr-densho-68, ddr-densho-69). Both VMs were just updated with make install on latest master; both were rebooted after the install and make status looked fine. For good measure, I ran make clean, then make install-app with a reboot on dragontail with no effect on the error.

Traceback from the console:

(ddrlocal)ddr@kinkura:/media/qnfs/kinkura/working/201609$ ddr-filter -ma -d /media/qnfs/kinkura/working/201609 /media/qnfs/kinkura/gold/ddr-densho-68
Traceback (most recent call last):`
  File "/usr/local/src/env/ddrlocal/bin/ddr-filter", line 4, in <module>
    __import__('pkg_resources').run_script('ddr-cmdln==0.9.4b0', 'ddr-filter')

  File "/usr/local/src/env/ddrlocal/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 744, in run_script
    self.require(requires)[0].run_script(script_name, ns)

  File "/usr/local/src/env/ddrlocal/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1499, in run_script
    exec(code, namespace, namespace)

  File "/usr/local/src/env/ddrlocal/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/EGG-INFO/scripts/ddr-filter", line 575, in <module>
    main()

  File "/usr/local/src/env/ddrlocal/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/EGG-INFO/scripts/ddr-filter", line 483, in main
    exclusion_list = make_exclusion_list(args.source)

  File "/usr/local/src/env/ddrlocal/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/EGG-INFO/scripts/ddr-filter", line 329, in make_exclusion_list
    nonpublic_json = nonpublic_json_files(files_json)

  File "/usr/local/src/env/ddrlocal/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/EGG-INFO/scripts/ddr-filter", line 267, in nonpublic_json_files
    if is_file_json(path):

  File "/usr/local/src/env/ddrlocal/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/EGG-INFO/scripts/ddr-filter", line 208, in is_file_json
    return re.search(MODEL_JSON_REGEX['file-json'], path)

KeyError: 'file-json'
gjost commented 8 years ago

Fixed in 366b275.

gjost commented 8 years ago

This was caused by code removal as part of the identifier refactor. Check develop to make sure we're not seeing the same problem there.

gjost commented 8 years ago

Fixed in develop in 8a74819.