-
Notifications
You must be signed in to change notification settings - Fork 53
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
qa error: update_package' object has no attribute 'get_logger' #62
Comments
same problem here |
Did you manage to solve it? |
The plugin is for some reason not able to fetch a logger instance. I solved the problem by manually creating my own logger instance in the qa script. |
Still its a fix! Could you help me create one as well? |
in "ckanext-qa/ckanext/qa/tasks.py" comment out all lines with "log = ..." then add the following lines after the import statements at the top of the file: import logging that should do the trick! |
thanks for the fix... the error is gone but still no stars, the Openess section is empty and now I get the error below. Also, If I remove qa from the plugins sections in my .ini file I get a similar message for the archiver plugin. Please see https://github.com/ckan/ckanext-archiver/issues/59
Any ideas? |
This is a problem with ckans translation function "_" , in your stacktrace "score_reason = _("Unknown error: %s") % str(e)" I dont know yet why this is not working. I have the same problem with my ckan installation. Maybe a configuration problem. A very ugly hack is to simply mock the "_" function by inserting def _(s): return s on top of the qa and archiver scripts which disables translations. |
I wasn't using any other language anyways... so it will do just fine! |
try ckanext-qa/ckanext/qa/tasks.py |
ok here's an update.. Perhaps it should be added in another file or in report or in archiver? Really dont have a clue. Thanks.
|
yes, you can see it in the stacktrace: "/home/hit/ckan/lib/default/src/ckan/ckan/model/license.py", line 242, in title return _("Open Data Commons Open Database License (ODbL)") here is the "_" function used again, but this time not in the qa or archiver plugin. If you want to go down this road you can try to insert the mock there too until all errors go away. |
looks like a slippery slope... tried it and now a get a new error... so your suggestion is to run the archiver/qa in the terminal and just CRTL-C when it hangs? |
I have no real solution at the moment, currently I try to make the "_" Function work again |
thanks for all this! let me know if you think of anything else. |
still a hack but better: in both tasks.py (in qa and archiver): search for
and replace it with
with this all errors go away for me, but you should still watch the logs of the archiver run as it showed some configuration problems of my installation |
yep, now it works! hopefully there will be an official fix, but this will do just fine! |
I get this error in the terminal when running it...
I use ckan 2.6.6.
The archiver/report works but I get no start in the openess section
[2018-07-19 13:08:34,246: ERROR/MainProcess] Task qa.update_package[another-test-ef74] raised unexpected: AttributeError("'update_package' object has no attribute 'get_logger'",) Traceback (most recent call last): File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/app/trace.py", line 240, in trace_task R = retval = fun(*args, **kwargs) File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/app/trace.py", line 438, in __protected_call__ return self.run(*args, **kwargs) File "/home/hit/ckan/lib/default/src/ckanext-qa/ckanext/qa/tasks.py", line 83, in update_package log = update_package.get_logger() File "/usr/lib/ckan/default/local/lib/python2.7/site-packages/celery/local.py", line 143, in __getattr__ return getattr(self._get_current_object(), name) AttributeError: 'update_package' object has no attribute 'get_logger'
The text was updated successfully, but these errors were encountered: