SunshineYang / mycheckpoint

Automatically exported from code.google.com/p/mycheckpoint
0 stars 1 forks source link

AttributeError: 'array.array' object has no attribute 'replace' #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.running mycheckpoint http
2.when open url in browser ,report error:

Exception happened during processing of request from ('172.16.153.1', 52752)
Traceback (most recent call last):
  File "/usr/lib64/python2.4/SocketServer.py", line 222, in handle_request
    self.process_request(request, client_address)
  File "/usr/lib64/python2.4/SocketServer.py", line 241, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib64/python2.4/SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib64/python2.4/SocketServer.py", line 521, in __init__
    self.handle()
  File "/usr/lib64/python2.4/BaseHTTPServer.py", line 316, in handle
    self.handle_one_request()
  File "/usr/lib64/python2.4/BaseHTTPServer.py", line 310, in handle_one_request
    method()
  File "/usr/bin/mycheckpoint", line 4238, in do_GET
    html = http_embed_code(html, '<div class="header">', html_embed)
  File "/usr/bin/mycheckpoint", line 4186, in http_embed_code
    html = html.replace(anchor, "%s%s" % (anchor, code))
AttributeError: 'array.array' object has no attribute 'replace'

mycheckpoint revsion 192
rhel 5.4
mysql-pyhon 1.2.1-1
python2.4
mysql 5.1.48

Original issue reported on code.google.com by hongbin...@gmail.com on 5 Oct 2010 at 2:29

GoogleCodeExporter commented 9 years ago
Can you please send over the URL you're trying to open?
I suspect the URL itself is malformed.

Original comment by shlomi.n...@gmail.com on 5 Oct 2010 at 3:44

GoogleCodeExporter commented 9 years ago
i use jfreechart(eastwood) replace google chart api because network is 
private not accsee Internet
Is it problem?

otherwise no this problem on windows OS

mysql-ptyhon 1.2.3
python 2.6

http://trac.edgewall.org/wiki/MySqlDb  this described  its bug

MySQL-python-1.2.2b2 was  reported to solve an AttributeError: 'array.array' 
object has no attribute 'startswith' error seen when viewing a changeset... 
These problems ought to be fixed in 1.2.2b3;

Original comment by hongbin...@gmail.com on 7 Oct 2010 at 3:11

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for the reference.
But can you please indicate the URL you were trying to open?

Original comment by shlomi.n...@gmail.com on 7 Oct 2010 at 6:11

GoogleCodeExporter commented 9 years ago
http://172.16.153.131:12306/mycheckpoint  
open the URL report error 

Exception happened during processing of request from ('172.16.153.1', 52752)
Traceback (most recent call last):
  File "/usr/lib64/python2.4/SocketServer.py", line 222, in handle_request
    self.process_request(request, client_address)
  File "/usr/lib64/python2.4/SocketServer.py", line 241, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib64/python2.4/SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib64/python2.4/SocketServer.py", line 521, in __init__
    self.handle()
  File "/usr/lib64/python2.4/BaseHTTPServer.py", line 316, in handle
    self.handle_one_request()
  File "/usr/lib64/python2.4/BaseHTTPServer.py", line 310, in handle_one_request
    method()
  File "/usr/bin/mycheckpoint", line 4238, in do_GET
    html = http_embed_code(html, '<div class="header">', html_embed)
  File "/usr/bin/mycheckpoint", line 4186, in http_embed_code
    html = html.replace(anchor, "%s%s" % (anchor, code))
AttributeError: 'array.array' object has no attribute 'replace'

Original comment by hongbin...@gmail.com on 8 Oct 2010 at 2:05

GoogleCodeExporter commented 9 years ago
My browser is safari 5.0.2 

mycheckpoint and mysql running vmware 

Original comment by hongbin...@gmail.com on 8 Oct 2010 at 2:32

GoogleCodeExporter commented 9 years ago
It does indeed seem that the problem is with older MySQLDb module. I'm changing 
status to NotABug. Thank you for the report.

PS "i use jfreechart(eastwood) replace google chart api because network is 
private not accsee Internet
Is it problem?" -- this isn't a problem, but jfreechart are not keeping pace 
with google charts. Why don't you try the new builtin javascript based charts, 
which do not need network connection at all?

Original comment by shlomi.n...@gmail.com on 14 Oct 2010 at 12:52

GoogleCodeExporter commented 9 years ago
How to use builtin js based charts,i not found in document。Could you please 
send a url to me? Thank you very much!

Original comment by hongbin...@gmail.com on 23 Oct 2010 at 4:07

GoogleCodeExporter commented 9 years ago
hongbin:
Best not to ask here, as this is a bug system and does not allow me to properly 
have organized discussions. Actually, I've created 
http://groups.google.com/group/mycheckpoint?pli=1 for that.
To answer your question: you just generate an HTML report. It will include JS 
charts. See examples in 
http://code.openark.org/forge/mycheckpoint/documentation/generating-html-reports

Original comment by shlomi.n...@gmail.com on 27 Oct 2010 at 6:38