Error when running barchart.py on Windows with Python 2.5

7 views
Skip to first unread message

mrelectron

unread,
Nov 2, 2009, 5:47:13 AM11/2/09
to pycha
Hi:

I'm having a problem with pycha, when running the barchart.py example,
there is some problem with the chartFactory function.

I'm new a Python and dont know how to fix it.

I'm running Python 2.5 on Windows.

==============================
H:\prj\pycha>barchart.py
Traceback (most recent call last):
File "H:\prj\pycha\barchart.py", line 53, in <module>
barChart('v' + output, pycha.bar.VerticalBarChart)
File "H:\prj\pycha\barchart.py", line 43, in barChart
chart = chartFactory(surface, options)
File "H:\bin\python\25\lib\site-packages\pycha\bar.py", line 25, in
__init__
super(BarChart, self).__init__(surface, options)
File "H:\bin\python\25\lib\site-packages\pycha\chart.py", line 54,
in __init__

self.options.merge(options)
File "H:\bin\python\25\lib\site-packages\pycha\chart.py", line 643,
in merge
self[key].merge(other[key])
File "H:\bin\python\25\lib\site-packages\pycha\chart.py", line 640,
in merge
for key, value in other.items():
AttributeError: 'str' object has no attribute 'items'
======================================================

Thanks
Mark

Lorenzo Gil Sanchez

unread,
Nov 4, 2009, 4:20:22 PM11/4/09
to py...@googlegroups.com
Hi Mark,

I don't usually run Windows but I've installed python 2.5.4, pycairo
and the full gtk bundle to test the barchart.py example. I'm running
everything in a virtual machine with an evaluation copy of Windows 7.
I'm worried about your setup but in my system everything works as
expected and can not reproduce your exception.

What version of pycha are you using?
Are you sure you are running an unmodified version of barchart.py? if
not, can you provide your version?

Best regards,

Lorenzo

2009/11/2 mrelectron <mark.a...@gmail.com>:
Reply all
Reply to author
Forward
0 new messages