denshoproject / ddr-cmdln

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

ddr-filter and ddr-pubcopy broken: "Exception('Could not import identifier definitions.')" #36

Closed GeoffFroh closed 8 years ago

GeoffFroh commented 8 years ago

ddr-filter command throws an exception -- "Could not import identifier definitions."

(ddrlocal)ddr@kinkura:/media/qnfs/kinkura/gold/ddr-densho-284$ ddr-filter -ma -s /media/qnfs/kinkura
/gold/ddr-densho-284 -d /media/qnfs/kinkura/working
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", li
ne 719, 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", li
ne 1504, 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 72, in <module>
    from DDR import identifier
  File "/usr/local/src/env/ddrlocal/local/lib/python2.7/site-packages/ddr_cmdln-0.9.4b0-py2.7.egg/DD
R/identifier.py", line 15, in <module>
    raise Exception('Could not import Identifier definitions!')
Exception: Could not import Identifier definitions!
GeoffFroh commented 8 years ago

ddr-pubcopy throws same exception

gjost commented 8 years ago

I'll head home so I can splashtop in...

gjost commented 8 years ago

ddr-defs is on master from 2016-06-03 (latest). ddr-cmdln is on master from 2016-06-06 (latest is 07-07). ddr-local is on master from 2016-06-09 (latest is 07-07).

gjost commented 8 years ago

Updated ddr-defs, ddr-cmdln, ddr-local to latest master.

Confirmed that ddr-checkbinaries, ddr-filter, ddr-pubcopy all display the behavior.

gjost commented 8 years ago

Fixed in eb91a0e283.

Each of these scripts contained from DDR import identifier without a from DDR import config. config adds repo_models to sys.path, so it must be imported before identifier.