Re: [Django] #13322: Problem with inspectdb and encoding

2011-04-21 Thread Django
#13322: Problem with inspectdb and encoding
-+-
   Reporter: |  Owner:  nobody
  josemaria@…| Status:  closed
   Type:  Bug|  Component:  Core (Management
  Milestone: |  commands)
Version:  1.2-beta   |   Severity:  Normal
 Resolution:  needsinfo  |   Keywords:
   Triage Stage:  Accepted   |  Has patch:  1
Needs documentation:  0  |Needs tests:  1
Patch needs improvement:  0  |  Easy pickings:  0
-+-
Changes (by claudep):

 * status:  new => closed
 * resolution:   => needsinfo
 * easy:   => 0


Comment:

 I attached a test that works for me (SQLite/Python2.6/Linux). But the
 problem might be triggered by a specific backend/python/OS combination.
 You should give more information about the conditions under which you are
 able to reproduce the bug.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13322: Problem with inspectdb and encoding

2010-04-12 Thread Django
#13322: Problem with inspectdb and encoding
-+--
  Reporter:  josema...@simpleoption.com  | Owner:  nobody  
Status:  new | Milestone:  
 Component:  django-admin.py inspectdb   |   Version:  1.2-beta
Resolution:  |  Keywords:  
 Stage:  Accepted| Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  1   
Needs_better_patch:  0   |  
-+--
Comment (by josema...@simpleoption.com):

 Test case:


 {{{
 create table test (
día date
 );

 

 myconsole> django-admin.py inspectdb

 


 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13322: Problem with inspectdb and encoding

2010-04-11 Thread Django
#13322: Problem with inspectdb and encoding
-+--
  Reporter:  josema...@simpleoption.com  | Owner:  nobody  
Status:  new | Milestone:  
 Component:  django-admin.py inspectdb   |   Version:  1.2-beta
Resolution:  |  Keywords:  
 Stage:  Accepted| Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  1   
Needs_better_patch:  0   |  
-+--
Changes (by russellm):

  * stage:  Unreviewed => Accepted
  * needs_tests:  0 => 1
  * milestone:  1.2 =>

Comment:

 This isn't critical for 1.2.

 It's difficult to evaluate whether the patch is correct without seeing a
 test case.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13322: Problem with inspectdb and encoding

2010-04-11 Thread Django
#13322: Problem with inspectdb and encoding
-+--
  Reporter:  josema...@simpleoption.com  | Owner:  nobody  
Status:  new | Milestone:  1.2 
 Component:  django-admin.py inspectdb   |   Version:  1.2-beta
Resolution:  |  Keywords:  
 Stage:  Unreviewed  | Has_patch:  1   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by josema...@simpleoption.com):

  * has_patch:  0 => 1
  * component:  Uncategorized => django-admin.py inspectdb
  * milestone:  => 1.2

Comment:

 Decode UTF-8 for table attribute names:


 {{{
 --- django/core/management/commands/inspectdb.py(revisión: 12947)
 +++ django/core/management/commands/inspectdb.py(copia de trabajo)
 @@ -110,7 +110,7 @@
  if not field_type in ('TextField(', 'CharField('):
  extra_params['null'] = True

 -field_desc = '%s = models.%s' % (att_name, field_type)
 +field_desc = '%s = models.%s' %
 (att_name.decode('utf-8'), field_type)
  if extra_params:
  if not field_desc.endswith('('):
  field_desc += ', '

 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13322: Problem with inspectdb and encoding

2010-04-11 Thread Django
#13322: Problem with inspectdb and encoding
-+--
  Reporter:  josema...@simpleoption.com  | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Uncategorized   |   Version:  1.2-beta
Resolution:  |  Keywords:  
 Stage:  Unreviewed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Old description:

> While trying to generate model from database with manage.py inspectdb I
> get the following error:
>
> class Categorias(models.Model):
> Traceback (most recent call last):
>   File "./manage.py", line 11, in 
> execute_manager(settings)
>   File "/usr/local/lib/python2.6/site-
> packages/django/core/management/__init__.py", line 438, in
> execute_manager
> utility.execute()
>   File "/usr/local/lib/python2.6/site-
> packages/django/core/management/__init__.py", line 379, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File "/usr/local/lib/python2.6/site-
> packages/django/core/management/base.py", line 196, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File "/usr/local/lib/python2.6/site-
> packages/django/core/management/base.py", line 223, in execute
> output = self.handle(*args, **options)
>   File "/usr/local/lib/python2.6/site-
> packages/django/core/management/base.py", line 352, in handle
> return self.handle_noargs(**options)
>   File "/usr/local/lib/python2.6/site-
> packages/django/core/management/commands/inspectdb.py", line 22, in
> handle_noargs
> for line in self.handle_inspection(options):
>   File "/usr/local/lib/python2.6/site-
> packages/django/core/management/commands/inspectdb.py", line 113, in
> handle_inspection
> field_desc = '%s = models.%s' % (att_name, field_type)
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4:
> ordinal not in range(128)

New description:

 While trying to generate model from database with manage.py inspectdb I
 get the following error:
 {{{
 class Categorias(models.Model):
 Traceback (most recent call last):
   File "./manage.py", line 11, in 
 execute_manager(settings)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/__init__.py", line 438, in execute_manager
 utility.execute()
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/__init__.py", line 379, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/base.py", line 196, in run_from_argv
 self.execute(*args, **options.__dict__)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/base.py", line 223, in execute
 output = self.handle(*args, **options)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/base.py", line 352, in handle
 return self.handle_noargs(**options)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/commands/inspectdb.py", line 22, in
 handle_noargs
 for line in self.handle_inspection(options):
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/commands/inspectdb.py", line 113, in
 handle_inspection
 field_desc = '%s = models.%s' % (att_name, field_type)
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4:
 ordinal not in range(128)
 }}}

Comment (by Alex):

 Please use preview.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #13322: Problem with inspectdb and encoding

2010-04-11 Thread Django
#13322: Problem with inspectdb and encoding
-+--
  Reporter:  josema...@simpleoption.com  | Owner:  nobody  
Status:  new | Milestone:  
 Component:  Uncategorized   |   Version:  1.2-beta
Resolution:  |  Keywords:  
 Stage:  Unreviewed  | Has_patch:  0   
Needs_docs:  0   |   Needs_tests:  0   
Needs_better_patch:  0   |  
-+--
Changes (by josema...@simpleoption.com):

  * needs_better_patch:  => 0
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 While trying to generate model from database with manage.py inspectdb I
 get the following error:

 {{{
 class Categorias(models.Model):
 Traceback (most recent call last):
   File "./manage.py", line 11, in 
 execute_manager(settings)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/__init__.py", line 438, in execute_manager
 utility.execute()
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/__init__.py", line 379, in execute
 self.fetch_command(subcommand).run_from_argv(self.argv)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/base.py", line 196, in run_from_argv
 self.execute(*args, **options.__dict__)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/base.py", line 223, in execute
 output = self.handle(*args, **options)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/base.py", line 352, in handle
 return self.handle_noargs(**options)
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/commands/inspectdb.py", line 22, in
 handle_noargs
 for line in self.handle_inspection(options):
   File "/usr/local/lib/python2.6/site-
 packages/django/core/management/commands/inspectdb.py", line 113, in
 handle_inspection
 field_desc = '%s = models.%s' % (att_name, field_type)
 UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4:
 ordinal not in range(128)

 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.