Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing data files during lom2mlr execution #2

Open
encolpe opened this issue Nov 20, 2015 · 0 comments
Open

Missing data files during lom2mlr execution #2

encolpe opened this issue Nov 20, 2015 · 0 comments

Comments

@encolpe
Copy link

encolpe commented Nov 20, 2015

After a pip install lom2mlr or a python setup.py install in the source folder I ran into this error:

Traceback (most recent call last):
  File "/home/encolpe/Projects/venv-lom2mlr/bin/lom2mlr", line 9, in <module>
    load_entry_point('lom2mlr==0.3.dev0', 'console_scripts', 'lom2mlr')()
  File "/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/lom2mlr/transform.py", line 137, in main
    converter = Converter(STYLESHEET)
  File "/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/lom2mlr/transform.py", line 61, in __init__
    converter.XMLTransform.__init__(self, stylesheet, extensions)
  File "/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/common/converter.py", line 33, in __init__
    stylesheet_xml = etree.parse(stylesheet)
  File "lxml.etree.pyx", line 3239, in lxml.etree.parse (src/lxml/lxml.etree.c:70141)
  File "parser.pxi", line 1749, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:102252)
  File "parser.pxi", line 1775, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:102516)
  File "parser.pxi", line 1679, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:101551)
  File "parser.pxi", line 1110, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:97003)
  File "parser.pxi", line 582, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:91461)
  File "parser.pxi", line 683, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:92647)
  File "parser.pxi", line 620, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:91908)
IOError: Error reading file '/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/lom2mlr/lom2mlr.xsl': failed to load external entity "/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/lom2mlr/lom2mlr.xsl"

After a quick search I realized that it comes from the package_data option in the setup file. Once the egg installed, the data are not in the lom2mlr subpackage but in egg's root:

find /home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/ -name "*.xsl"
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/lom2mlr.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-3-2011-VA.2_eng.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.2_eng.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.2_mlr.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-9-2014-VA.2.1_eng.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.5_fra.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.5_rus.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.4_mlr.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.4_fra.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.5_mlr.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.2_rus.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.4_eng.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.3_fra.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.5_eng.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.1_mlr.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.1_rus.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.4_rus.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-3-2011-VA.2_mlr.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.1_fra.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-3-2011-VA.2_fra.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.3_eng.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.2_fra.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-3-2011-VA.2_rus.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-9-2014-VA.2.1_rus.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-9-2014-VA.2.1_mlr.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-9-2014-VA.2.1_fra.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.3_mlr.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.3_rus.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/vdex/ISO_IEC_19788-5-2012-VA.1_eng.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/translations/translation_mlr.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/translations/translation_rus.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/translations/translation_eng.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/translations/translation_fra.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/iso639.xsl
/home/encolpe/Projects/venv-lom2mlr/local/lib/python2.7/site-packages/lom2mlr-0.3.dev0-py2.7.egg/correspondances_xsl.xsl

If you choose to install the egg in develop mode (eg: python setup.py develop) you don't run into this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant