Bug 331084 - Some python file do not parse
Summary: Some python file do not parse
Status: RESOLVED FIXED
Alias: None
Product: kdev-python
Classification: Developer tools
Component: Language support (show other bugs)
Version: unspecified
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Sven Brauch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-13 07:31 UTC by Alexandr Zamaraev (aka Tonal)
Modified: 2014-03-10 20:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
file not parsed (1.37 KB, text/x-python)
2014-02-13 07:33 UTC, Alexandr Zamaraev (aka Tonal)
Details

Note You need to log in before you can comment on or make changes to this bug.
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.