-
Notifications
You must be signed in to change notification settings - Fork 16
Parsing failed due to Exception: Could not determine Python version #27
Comments
I'll take a look at it, thanks for the good report. |
I can reproduce it. Actually, I think there are two bugs here. The first one is the Python driver saying "I can get what version is this" and raising and exceptions instead of defaulting to Python 3 in that case (since it's compatible with both). But even this error, that is correctly returned by the native driver using the protocol (tested) shouldn't cause a nil pointer deference in the SDK, so this is the second bug. I'll add both here as a list and keep it updated:
|
Thank you for the assessment! |
Yes, this bug is my first priority after I help de machine learning team confirm bblfsh/bblfshd/issues/34 since it could be related with bblfsh/bblfshd/issues/36. |
Some of the files that fail can't be parsed because they've inconsistent use of tabs and spaces. Which makes me wonder if they even run. This is actually a check that Python's AST module does before even starting to parse (it produces a TabError in Python3 and an syntax error in Python 2) so it doesn't produce any AST, which by the spec is a fatal error (which is returned, trough the message could be better). The solution would be to fix the files before trying to parse them with any of the tools available. I'm not sure if this should be done at the Python driver side, tough. So if that solution works for you I should close the report (if not please tell me and I'll reopen it). The nil pointer is actually because on fatal errors the response status will be "fatal" (as is in your provided code in this case), the errors will be a list of errors and the UAST nil, so that's not actually a bug. |
I've created a different issue for the non propagation of the syntax error to the response: |
Using latest https://gist.github.com/bzz/c0c3dbcab5fecbe48e22167e2ad78595 UAST parsing fails on what seems to be https://github.com/damoeb/kalipo/blob/master/kalipo-ir/harvester/spiders/heise_spider.py
Serve log
Client logs
The text was updated successfully, but these errors were encountered: