Opened 17 years ago
Closed 17 years ago
#3223 closed defect (invalid)
AttributeError: 'array.array' object has no attribute 'replace'
| Reported by: | anonymous | Owned by: | osimons |
|---|---|---|---|
| Priority: | normal | Component: | FullBlogPlugin |
| Severity: | major | Keywords: | |
| Cc: | Trac Release: | 0.11 |
Description
I was just trying to post my first blog on my new install, but it didn't create it. I'v tried with and without category as well.
Some idea were nice.
Than you, G.
How to Reproduce
While doing a POST operation on /blog/create, Trac issued an internal error.
(please provide additional details here)
Request parameters:
{'__FORM_TOKEN': u'2d8e2170313da154e83699aa',
'action': u'new',
'author': u'stenzing',
'blog-save': u'Save Post',
'blog_path': u'create',
'body': u'Ez az els\u0151 bejegyz\xe9s ide, \xedgy ki kell pr\xf3b\xe1lnom p\xe1r dolgot.\r\n\u0171\xf3\xfc\xf6\xfa\u0151',
'categories': u'main main',
'name': u'wellcome_post',
'new_version_comment': u'',
'title': u'\xdcdv\xf6z\xf6lj\xfck!'}
User Agent was: Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.9) Gecko/2008052906 Firefox/3.0
System Information
| Trac | 0.11rc2
|
| Python | 2.4.4 (#2, Apr 15 2008, 23:43:20) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]
|
| setuptools | 0.6c3
|
| MySQL | server: "5.0.32-Debian_7-log", client: "5.0.32", thread-safe: 1
|
| MySQLdb | 1.2.1_p2
|
| Genshi | 0.6dev-r888
|
| jQuery: | 1.2.3
|
Python Traceback
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/Trac-0.11rc2-py2.4.egg/trac/web/main.py", line 423, in _dispatch_request
dispatcher.dispatch(req)
File "/usr/lib/python2.4/site-packages/Trac-0.11rc2-py2.4.egg/trac/web/main.py", line 197, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/lib/python2.4/site-packages/TracFullBlogPlugin-0.1-py2.4.egg/tracfullblog/web_ui.py", line 205, in process_request
the_post = BlogPost(self.env, pagename)
File "/usr/lib/python2.4/site-packages/TracFullBlogPlugin-0.1-py2.4.egg/tracfullblog/model.py", line 403, in __init__
self._load_post(version)
File "/usr/lib/python2.4/site-packages/TracFullBlogPlugin-0.1-py2.4.egg/tracfullblog/model.py", line 541, in _load_post
fields = self._fetch_fields(version)
File "/usr/lib/python2.4/site-packages/TracFullBlogPlugin-0.1-py2.4.egg/tracfullblog/model.py", line 533, in _fetch_fields
fields['category_list'] = set(_parse_categories(row[7]))
File "/usr/lib/python2.4/site-packages/TracFullBlogPlugin-0.1-py2.4.egg/tracfullblog/model.py", line 256, in _parse_categories
categories = categories.replace(',', ' ') # drop commas
AttributeError: 'array.array' object has no attribute 'replace'
Attachments (0)
Change History (2)
comment:1 Changed 17 years ago by
| Severity: | normal → major |
|---|
comment:2 Changed 17 years ago by
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
Some googleing seems to point to errors in your MySQL setup. Specifically it seems that wrong collation will return byte/char array instead of strings through the Python driver.
You need to check trac:wiki:MySqlDb, and specifically the utf8_general_ci collation setting.
The closed duplicate ticket also seems to point to issues outside the fullblog plugin, so I'm closing the ticket as 'invalid'.



#3224 closed as duplicate. Note that this ticket provokes the error by a simple
GETon blog front page ('/blog').