ckan/ckanext-pdfview

PDF viewer produces internal server error

Closed this issue · 8 comments

Hi,
we upgraded to CKAN 2.3 yesterday and installed this extension. Unfortunately, the preview gives us an internal server error:
publication - unnamed resource - rdmba - chromium_044

the corresponding output in the log is:

Wed Mar 18 15:22:21 2015] [error] [client 132.xxx.xxx.xxx] Error - <type 'exceptions.AttributeError'>: 'module' object has no attribute 'ckanext-pdfview/main'

Is this a configuration issue on our side?

Best
Stefan

@zarquon42b, did you install using pip? If so, the PyPI release is yet to be updated with the latest code.

Do a Development Installation for now and it should work.

Same result.

sorry, my bad. I t works now.
Thanks a lot.

@zarquon42b did you do anything? I'm getting

AttributeError: 'module' object has no attribute 'ckanext-pdfview/main'

when I try and use the pdf_view


Edit: python setup.py develop instead of python setup.py install (on a cloned version) worked for me.

At first, installing the version from git repo did not work at all. But suddenly, after some fiddeling about, removing all remains of pdfview from the site-library and rerunning python setup.py develop in pdfview's directory, it suddenly worked. I also cleaned ckan directory using git clean -f -x -d and reran python setup.py develop.

I cannot explain why it suddenly worked.

Best Stefan

Thanks @zarquon42b, @rossjones. I suspect this is because pdfview used to be part of CKAN core, and both of you apparently did upgrades of your existing pre-2.3 source installations.

On a fresh 2.3 install it works.

I'll add a Troubleshooting section to the README for other upgraders.

This was most likely caused because we were not including the fanstatic resource.config file when packaging the extension. This was fixed in 63e3bf2

Can people do pip install --upgrade ckanext-pdfview to see if the issue is fixed?

Sorry about the confusion, I'll update the extensions template on ckan core to make sure this file is included.

@jqnatividad I uploaded the new version to Pypi, let me know your user name there and I'll add you as a maintainer so you can upload new versions.

I've re-added the instructions for releasing a new version: https://github.com/ckan/ckanext-pdfview#releasing-a-new-version-of-ckanext-pdfview

Thanks @amercader! My Pypi username is the same (jqnatividad)