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

Datapusher gives "IndexError: pop from empty list" when I try to upload a pdf to it. #91

Closed
BartPraats opened this issue Nov 19, 2015 · 2 comments

Comments

@BartPraats
Copy link

When I upload or link a PDF file as a resource and then try to push it to the datastore I get the following error:

Fetching from: http://127.0.0.1:5000/dataset/e336410b-5d3d-4669-a29a-0f7c114077e5/resource/396941c8-a56c-4673-b232-cd7a9bc0faf6/download/test.pdf
Job "push_to_datastore (trigger: RunTriggerNow, run = True, next run at: None)" raised an exception
     Traceback (most recent call last):
     File "/usr/local/lib/python2.7/dist-packages/apscheduler/scheduler.py", line 512, in _run_job
retval = job.func(*job.args, **job.kwargs)
     File "/home/bart/ckan/lib/default/src/datapusher/datapusher/jobs.py", line 343, in push_to_datastore
row_set = table_set.tables.pop()
     IndexError: pop from empty list

Also see:
http://stackoverflow.com/questions/33775693/ckan-datapusher-pdf-gives-indexerror-pop-from-empty-list-when-uploading-to-da

Any Ideas?

@carlosporter
Copy link

Hello

I deployed CKAN 2.6.2 from source and I'm seeing the same issue when I try to upload a WMS resource to the datastore.

Here is the error output:

Error: File "/usr/lib/ckan/datapusher/lib/python2.7/site-packages/apscheduler/scheduler.py", line 512, in _run_job retval = job.func(*job.args, **job.kwargs) File "/usr/lib/ckan/datapusher/src/datapusher/datapusher/jobs.py", line 393, in push_to_datastore row_set = table_set.tables.pop() IndexError('pop from empty list',)

So far I'm not sure is this is a configuration problem or a bug in the datastore/datapusher.

The data I'm using is being pulled from this URL:

http://lsp1.momra.gov.sa:6080/arcgis/services/BaseImagery/ImageServer/WMSServer?

Any advice would be appreciated.

@amercader
Copy link
Member

The DataStore is only designed to be used with structured data and DataPusher in particular only works with tabular data, eg CSV or Excel files.

For displaying PDFs check ckanext-pdfview and for WMS check ckanext-geoview

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

3 participants