Newbie install question: syncdb: Data truncated for column 'picture' at row 1

173 views
Skip to first unread message

kenneth kufluk

unread,
Oct 5, 2008, 8:04:29 AM10/5/08
to Satchmo users
Hi

I'm trying to get a first-install running on Django1.0 and the latest
SVN version of Satchmo.

I get an error when running syncdb for the first time, as shown below.
I'm using a MySQL database, and I think I have everything configured
as per instructions.

If carrying on with installation, I get a subsequent error when
loading the l10n data.

Please can you point out what I may have done wrong? :)

Many thanks
Kenneth

...
Installing index for upsell.UpsellTranslation model
Installing yaml fixture 'initial_data' from 'C:\dev\lib\Python25\lib
\site-packag
es\satchmo\shop\fixtures'.
Problem installing fixture 'C:\dev\lib\Python25\lib\site-packages
\satchmo\shop\f
ixtures\initial_data.yaml': Traceback (most recent call last):
File "C:\dev\lib\django\django\core\management\commands
\loaddata.py", line 116
, in handle
obj.save()
File "C:\dev\lib\django\django\core\serializers\base.py", line 163,
in save
models.Model.save_base(self.object, raw=True)
File "C:\dev\lib\django\django\db\models\base.py", line 390, in
save_base
created=(not record_exists), raw=raw)
File "C:\dev\lib\django\django\dispatch\dispatcher.py", line 148, in
send
response = receiver(signal=self, sender=sender, **named)
File "C:\dev\lib\Python25\Lib\site-packages\satchmo\thumbnail
\field.py", line
86, in _save_rename
instance.save()
File "C:\dev\lib\django\django\db\models\base.py", line 307, in save
self.save_base(force_insert=force_insert,
force_update=force_update)
File "C:\dev\lib\django\django\db\models\base.py", line 358, in
save_base
rows = manager.filter(pk=pk_val)._update(values)
File "C:\dev\lib\django\django\db\models\query.py", line 429, in
_update
return query.execute_sql(None)
File "C:\dev\lib\django\django\db\models\sql\subqueries.py", line
117, in exec
ute_sql
cursor = super(UpdateQuery, self).execute_sql(result_type)
File "C:\dev\lib\django\django\db\models\sql\query.py", line 1724,
in execute_
sql
cursor.execute(sql, params)
File "C:\dev\lib\django\django\db\backends\util.py", line 19, in
execute
return self.cursor.execute(sql, params)
File "C:\dev\lib\django\django\db\backends\mysql\base.py", line 83,
in execute

return self.cursor.execute(query, args)
File "C:\dev\lib\Python25\lib\site-packages\MySQLdb\cursors.py",
line 168, in
execute
if not self._defer_warnings: self._warning_check()
File "C:\dev\lib\Python25\lib\site-packages\MySQLdb\cursors.py",
line 82, in _
warning_check
warn(w[-1], self.Warning, 3)
File "C:\dev\lib\Python25\lib\warnings.py", line 62, in warn
globals)
File "C:\dev\lib\Python25\lib\warnings.py", line 102, in
warn_explicit
raise message
Warning: Data truncated for column 'picture' at row 1

--
Kenneth
http://kenneth.kufluk.com

Chris Moffitt

unread,
Oct 5, 2008, 9:25:33 AM10/5/08
to satchm...@googlegroups.com
Make sure you have the database set for utf-8. Here's one previous thread about the issue -
http://groups.google.com/group/satchmo-users/browse_thread/thread/28e16f90cd237792/b040a6ea9d894cf5?lnk=gst&q=mysql+utf-8#b040a6ea9d894cf5

-Chris

kenneth kufluk

unread,
Oct 5, 2008, 9:35:49 AM10/5/08
to Satchmo users
Thanks Chris. I'll check that.
I just switched to Postgres, and seem to get an error in the same
(similar place):
Postgres is def set for UTF-8.
DataError: value too long for type character varying(100)






On Oct 5, 2:25 pm, "Chris Moffitt" <ch...@moffitts.net> wrote:
> Make sure you have the database set for utf-8. Here's one previous thread
> about the issue -http://groups.google.com/group/satchmo-users/browse_thread/thread/28e...
>
> -Chris

kenneth kufluk

unread,
Oct 5, 2008, 9:50:48 AM10/5/08
to Satchmo users
Ok, I've figured it out.
The database value for the product.productimage.picture is limited to
100 chars.
But since my install dir is quite deep, the full path to the image
value is longer than that.
I suggest extending the field length, in case others are also
installing satchmo deeper in the filesystem.

Cheers
K

On Oct 5, 2:35 pm, kenneth kufluk <kenneth.kuf...@googlemail.com>
wrote:

Chris Moffitt

unread,
Oct 5, 2008, 10:28:06 AM10/5/08
to satchm...@googlegroups.com
Interesting. Would you mind opening a ticket for this so we don't loose track of it.

-Chris

kenneth kufluk

unread,
Oct 5, 2008, 12:16:07 PM10/5/08
to Satchmo users
Reply all
Reply to author
Forward
0 new messages