1

Facing a weird issue. import pygal is successful. But not able to use it. Below is a Ubuntu. Same thing in my mac works.

Thanks for your help !

Python 2.7.6 (default, Jun 22 2015, 18:00:18)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygal
>>>
>>> pygal.Line()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Line'
>>> pygal.Line
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Line'
>>> pygal.Bar()`enter code here`
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Bar'
>>>
  • http://stackoverflow.com/questions/30045872/pygal-on-windows-cannot-access-classes-from-pygal I had a file name pygal.py in the same path – user5932481 Feb 16 '16 at 00:17
  • You can answer your question, and then mark it as the correct answer. – zondo Feb 16 '16 at 01:06

1 Answers1

1

You had a file named 'pygal.py' in your path.

Endlisnis
  • 481
  • 4
  • 9