Bug 331084

Summary: Some python file do not parse
Product: [Developer tools] kdev-python Reporter: Alexandr Zamaraev (aka Tonal) <tonal.promsoft>
Component: Language supportAssignee: Sven Brauch <mail>
Status: RESOLVED FIXED    
Severity: normal CC: f.esser
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: file not parsed

Description Alexandr Zamaraev (aka Tonal) 2014-02-13 07:31:52 UTC
Some python file do not parse if contains string with "u" prefix.
I run kdevelop with enable debug out:
 ====> PARSING ====> parsing file  KUrl("file:///home/tonal/lang/projects/promsoft/epool/amon/amon/amon/downloadermiddleware/blocked.py") ; has priority -10000 
 ====> AST     ====>     building abstract syntax tree for  "/home/tonal/lang/projects/promsoft/epool/amon/amon/amon/downloadermiddleware/blocked.py" 
kdevelop(1449)/kdevelop (python support) Python::AstBuilder::parse: DID NOT RECEIVE A SYNTAX TREE -- probably parse error. 
no codec search functions registered: can't find encodingEventual errors while extracting tuple:  
<nil>kdevelop(1449)/kdevelop (python support) Python::AstBuilder::parse: Error retrieving error message, not displaying, and not doing anything 
kdevelop(1449)/kdevelop (python support) Python::ParseJob::run: ---- Parsing FAILED ---- 


Reproducible: Always
Comment 1 Alexandr Zamaraev (aka Tonal) 2014-02-13 07:33:57 UTC
Created attachment 85123 [details]
file not parsed
Comment 2 Sven Brauch 2014-02-13 08:22:33 UTC
Yeah, it's a problem. I'm unsure how to solve it for python 2. I think it had worked at some point, but I'm unsure how it broke.

In Python 3, it should work fine, no?

Greetings!
Comment 3 Alexandr Zamaraev (aka Tonal) 2014-02-13 09:18:54 UTC
I use scrapy. Scrapy do not support python 3...
http://doc.scrapy.org/en/latest/faq.html#does-scrapy-work-with-python-3
Comment 4 Florian Eßer 2014-02-21 08:23:01 UTC
The same thing happens if you use
from __future__ import unicode_literals
instead of u''-strings.
Comment 5 Sven Brauch 2014-03-10 20:29:17 UTC
Should be fixed by a recent patch supplied by Alexandr.