Python - Error al general las tablas en base de datos (DJANGO)

 
Vista:
Imágen de perfil de Cristofer

Error al general las tablas en base de datos (DJANGO)

Publicado por Cristofer (34 intervenciones) el 07/02/2015 03:50:32
Tengo el siguiente código en el models.py de una app


1
2
3
4
5
6
7
from django.db import models
 
#class Autor(models.Model):
#	nombre = models.CharField(max_length = 50)
#	pais = models.CharField(max_length = 50)
#	descripcion = models.TextField(max_length = 200)
#	foto = models.ImageField(upload_to='foto_autor')


Cuando descomento y ejecuto

1
manage.py syncdb

me tira error

Ya tengo agregada la app a mi lista de apps...
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de Cristofer

Error al general las tablas en base de datos (DJANGO)

Publicado por Cristofer (34 intervenciones) el 07/02/2015 05:13:26
Este es el error:

Traceback (most recent call last):
File "C:\Users\Cristofer\devcodela\Scripts\BibliotecaVi rtual\manage.py", line
10, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\core\managem
ent\__init__.py", line 385, in execute_from_command_line
utility.execute()
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\core\managem
ent\__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self. argv)
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\core\managem
ent\base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\core\managem
ent\base.py", line 337, in execute
self.check()
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\core\managem
ent\base.py", line 371, in check
all_issues = checks.run_checks(app_configs=app_configs, tags=tags)
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\core\checks\
registry.py", line 59, in run_checks
new_errors = check(app_configs=app_configs)
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\core\checks\
model_checks.py", line 28, in check_all_models
errors.extend(model.check(**kwargs))
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\db\models\ba
se.py", line 1046, in check
errors.extend(cls._check_fields(**kwargs))
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\db\models\ba
se.py", line 1122, in _check_fields
errors.extend(field.check(**kwargs))
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\db\models\fi
elds\files.py", line 384, in check
errors.extend(self._check_image_library_installed( ))
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\db\models\fi
elds\files.py", line 389, in _check_image_library_installed
from django.utils.image import Image # NOQA
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\utils\image.
py", line 156, in <module>
Image, _imaging, ImageFile = _detect_image_library()
File "C:\Python27\lib\site-packages\django-1.7.4-py2.7.egg\django\utils\image.
py", line 134, in _detect_image_library
"imported: %s" % err
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf3 in position 38: ordinal
not in range(128)
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de Cristofer

Error al general las tablas en base de datos (DJANGO)

Publicado por Cristofer (34 intervenciones) el 07/02/2015 06:32:19
Solucion:

en la cmd de windows:

easy_install Pillow

y listo :D
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar
Imágen de perfil de xve
Val: 2.239
Plata
Ha mantenido su posición en Python (en relación al último mes)
Gráfica de Python

Error al general las tablas en base de datos (DJANGO)

Publicado por xve (1646 intervenciones) el 07/02/2015 10:59:29
Gracias por compartirlo!!
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar