Unterminated string literal
Seems to be the same or similar issue to #199, which is now closed so opening a new one here.
Our API key is set in the ckan.ini file, not command line, so shouldn't be caused by the same issue? Test was done uploading a file from the web interface.
$ ckan -c /etc/ckan/plymouth/ckan.ini xloader status
2024-03-07 00:04:56,401 INFO [ckan.cli] Using configuration file /etc/ckan/plymouth/ckan.ini
2024-03-07 00:04:56,401 INFO [ckan.config.environment] Loading static files from public
2024-03-07 00:04:56,799 INFO [ckan.config.environment] Loading templates from /home/ckan/ckan/lib/plymouth/src/ckan/ckan/templates
2024-03-07 00:04:57,662 INFO [ckan.config.environment] Loading templates from /home/ckan/ckan/lib/plymouth/src/ckan/ckan/templates
2024-03-07 00:04:58,003 WARNI [ckan.config.middleware.flask_app] Extensions are excluded from CSRF protection! We allow extensions to run without CSRF protection but it will be forced future releases. Read the documentation for more information on how to add CSRF protection to your extension.
Traceback (most recent call last):
File "/usr/lib/ckan/plymouth/bin/ckan", line 8, in <module>
sys.exit(ckan())
File "/usr/lib/ckan/plymouth/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/ckan/plymouth/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/lib/ckan/plymouth/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/ckan/plymouth/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/ckan/plymouth/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/ckan/plymouth/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/lib/ckan/plymouth/lib/python3.10/site-packages/ckanext/xloader/cli.py", line 22, in status
cmd.print_status()
File "/usr/lib/ckan/plymouth/lib/python3.10/site-packages/ckanext/xloader/command.py", line 130, in print_status
job_params = eval(job.description.replace(
File "<string>", line 1
({'api_key': '[api key redacted]...)
^
I am on 2.10.3 and using the new style API key as described here.
seems like this is simply a symptom of there being jobs queued, running the worker made this no longer appear (by function of now saying "No jobs currently queued" instead).
What version of XLoader are you running?
I installed via pip as per the readme, which tells me version 0.12.2 for ckanext-xloader.
XLoader itself seems to be working now (as per my previous comment) but I think I just got confused about it because this error shows on the xloader status command. The jobs are being processed correctly, this seems to be only an issue when trying to view pending jobs through the command line.
Hi @Lana-chan
The pypi version is very out of date.
@ThrawnCA and myself (@duttonw ) were only recently added to maintain this repo and have not been given pypi deployments just yet.
At this time, please try with pip via git. ie
pip install git+https://github.com/ckan/repogit@(version tag or branch)
Regards
@duttonw