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

exceptions.AttributeError: 'NoneType' object has no attribute 'split' #21

Open
edelmann opened this issue Apr 17, 2015 · 0 comments
Open
Labels

Comments

@edelmann
Copy link
Contributor

I sometimes see this kinds of errors in the logs:

2015-04-17 16:06:53+0200 [HTTPChannel,48,127.0.0.1] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1438, in dataReceived
finishCallback(data[contentLength:])
File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1667, in _finishRequestBody
self.allContentReceived()
File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 1730, in allContentReceived
req.requestReceived(command, path, version)
File "/usr/lib/python2.7/dist-packages/twisted/web/http.py", line 826, in requestReceived
self.process()
--- ---
File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 189, in process
self.render(resrc)
File "/usr/lib/python2.7/dist-packages/twisted/web/server.py", line 238, in render
body = resrc.render(self)
File "/usr/lib/python2.7/dist-packages/twisted/web/resource.py", line 250, in render
return m(request)
File "/usr/local/lib/python2.7/dist-packages/sgas/server/insertresource.py", line 81, in render_POST
d = self.insertRecords(data, subject, hostname)
File "/usr/local/lib/python2.7/dist-packages/sgas/server/insertresource.py", line 95, in insertRecords
d = inserter.insertJobUsageRecords(data, self.db, self.authorizer, subject, hostname)
File "/usr/local/lib/python2.7/dist-packages/sgas/database/inserter.py", line 40, in insertJobUsageRecords
if authorizer.isAllowed(insert_identity, rights.ACTION_JOB_INSERT, ctx):
File "/usr/local/lib/python2.7/dist-packages/sgas/authz/engine.py", line 177, in isAllowed
if ctx_checker.contextCheck(subject, user_action_rights.contexts, context):
File "/usr/local/lib/python2.7/dist-packages/sgas/authz/ctxinsertchecker.py", line 61, in contextCheck
ic_parts = [ p for p in ic.split('.') if p != '' ]
exceptions.AttributeError: 'NoneType' object has no attribute 'split'

It happens for the clusters abisko-ce.hpc2n.umu.se and atlas.triolith.nsc.liu.se. When these clusters tries to insert stuff, 'action_context' in contextCheck() in sgas/authz/ctxinsertchecker.py has values like

[('machine_name', None), ('machine_name', 'atlas.triolith.nsc.liu.se')]

For other clusters, 'action_context' tend to be something like e.g.

[('machine_name', 'ce02.grid.uio.no')]

Whether the bug is that 'action_context' has those None:s in it to start with, or if it is that contextCheck() can't handle those situations, I don't know.

@kmjonsson kmjonsson added the bug label Apr 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants