cansafa26 / zen-coding

Automatically exported from code.google.com/p/zen-coding
0 stars 0 forks source link

AttributeError: 'str' object has no attribute 'value' #51

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
expand_abbreviation('table+')

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "<pyshell#6>", line 1, in <module>
    expand_abbreviation('table+')
  File "D:\JetBrains\ReSharper\PowerToys\Bin\zencoding\zen_core.py", line
358, in expand_abbreviation
    tree = parse_into_tree(abbr, doc_type)
  File "D:\JetBrains\ReSharper\PowerToys\Bin\zencoding\zen_core.py", line
315, in parse_into_tree
    abbr = re.sub(r'([a-z][a-z0-9]*)\+$', expando_replace, abbr)
  File "C:\Python26\lib\re.py", line 151, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "D:\JetBrains\ReSharper\PowerToys\Bin\zencoding\zen_core.py", line
285, in expando_replace
    return a and a.value or ex
AttributeError: 'str' object has no attribute 'value'

What version of the product are you using? On what operating system?
Windows 7, Python 2.6

Original issue reported on code.google.com by derigel on 24 Nov 2009 at 9:28

GoogleCodeExporter commented 8 years ago
Version from trunk, 0.5

Original comment by derigel on 24 Nov 2009 at 9:34

GoogleCodeExporter commented 8 years ago
Zen Coding requires Python 2.5+ version in order to run (which is available in 
Mac OS Leopard by default). 
Please upgrade Python

Original comment by serge....@gmail.com on 24 Nov 2009 at 10:17

GoogleCodeExporter commented 8 years ago
Hmmm... I am using Python 2.6.
Do I need exactly 2.5 branch, not newer?

Original comment by derigel on 24 Nov 2009 at 12:05

GoogleCodeExporter commented 8 years ago
Doesn't work on Python 2.5.4 ether.
Seems some Windows Python related issue...

Original comment by derigel on 24 Nov 2009 at 12:15

GoogleCodeExporter commented 8 years ago
Sorry, wrote comment for wrong issue :)
Looks like a bug in my code, I'll do some testing on it

Original comment by serge....@gmail.com on 24 Nov 2009 at 12:23

GoogleCodeExporter commented 8 years ago
OK, my bad: abbreviations were not loaded and parsed by default on start up. 
Please update from trunk, this 
should work fine.

Original comment by serge....@gmail.com on 24 Nov 2009 at 12:39

GoogleCodeExporter commented 8 years ago
Yep, all works.
Thanks!

Original comment by derigel on 24 Nov 2009 at 1:06

GoogleCodeExporter commented 8 years ago

Original comment by serge....@gmail.com on 15 Jan 2010 at 10:21