PyChart into web site error

Michele Petrazzo michele.petrazzo at TOGLIunipex.it
Wed Apr 13 03:12:04 EDT 2005


Lee Harr wrote:
> On 2005-04-12, Michele Petrazzo <michele.petrazzo at TOGLIunipex.it> wrote:
> 
>>I'm using PyChart like a module for create charts into a little web
>>site, but when I try to create one, I have this error:
>>
>>/var/www/html/lgt/draw.py:19, in draw:
>>can = canvas.init(self.file_name)
>>/usr/lib/python2.3/site-packages/pychart/canvas.py:60, in init:
>>can = pngcanvas.T(fname)
>>/usr/lib/python2.3/site-packages/pychart/pscanvas.py:25, in __init__:
>>basecanvas.T.__init__(self)
>>/usr/lib/python2.3/site-packages/pychart/basecanvas.py:70, in __init__:
>>self.title = re.sub("(.*)\\.py$", "\\1", sys.argv[0])
>>
>>AttributeError: 'module' object has no attribute 'argv'
>>
>>Why my script doesn't have sys.argv?
>>
>>Is there another way to use PyChart into my script?
>>


> You are probably going to have to give more details.
> 
> Is there a file in your html/lgt folder called sys?

No.

 >>> os.listdir('/var/www/html/lgt/')
['engine.py', 'db.py', 'index.spy', 'linetest.py', 'index.html', 
'db_mysql.py', 'mysession.spy', 'cds.html', 'templates', 'tmp', 'draw.py']
 >>>

> 
> How are you serving the pages?

Apache 2.0.48, mod_python 3.1.3 and Python 2.3.3
on my mdk 10.0

Thanks,
Michele



More information about the Python-list mailing list