Running makemessages with domain djangojs results in UnicodeDecodeError

2022-04-06 Thread Benedikt Karl
Hello, I am using the provided localization by Django. I wanted to use gettext with some of my javascript files and thus enabled the JavaScriptCatalog and executed this command: python manage.py makemessages -d djangojs -l de However, this results in a UnicodeDecodeError, ultimately caused

Re: DRF UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6

2019-11-20 Thread Aldian Fazrihady
go\http\response.py", line 289, in > __init__ > super().__init__(*args, **kwargs) > File "C:\Python37\lib\site-packages\django\http\response.py", line 60, in > __init__ > content_type = '%s; charset=%s' % (settings.DEFAULT_CONTENT_TYPE, > File &quo

Re: DRF UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6

2019-11-20 Thread Sarah Werker
gt; File "C:\Python37\lib\site-packages\django\http\response.py", line 60, in > __init__ > content_type = '%s; charset=%s' % (settings.DEFAULT_CONTENT_TYPE, > File "C:\Python37\lib\site-packages\django\conf\__init__.py", line 120, in > DEFAULT_CONTENT_TYPE &

DRF UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6

2019-10-21 Thread Kerstin Rohm
", line 285, in line self._line = linecache.getline(self.filename, self.lineno).strip() File "C:\Python37\lib\linecache.py", line 16, in getline lines = getlines(filename, module_globals) File "C:\Python37\lib\linecache.py", line 47, in getlines return updatecache(f

Re: Django UnicodeDecodeError

2018-04-17 Thread James Schneider
> > iit's all right in unbuntu,but maybe something wrong with my windows. > Every time someone posts an error like this, it is because the hostname of the machine contains a non-ASCII character. What is the hostname? -James -- You received this message because you are subscribed to the Google G

Django UnicodeDecodeError

2018-04-17 Thread fadingneko
iit's all right in unbuntu,but maybe something wrong with my windows. -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Test Client response.json() UnicodeDecodeError

2017-03-02 Thread Aniruddha Maru
27;m using: >> >>- Django==1.9.4 >>- djangorestframework==3.3.3 >> >> >> I have set the rest framework setting UNICODE_JSON to True. >> >> When i'm testing a JSON response that contains a special character like >> 'á' th

Re: Test Client response.json() UnicodeDecodeError

2017-03-02 Thread Aniruddha Maru
>>> >>> >>> I have set the rest framework setting UNICODE_JSON to True. >>> >>> When i'm testing a JSON response that contains a special character like >>> 'á' then I get a UnicodeDecodeError. This is the traceback: >

Re: Problem UnicodeDecodeError when run createsuper

2017-02-05 Thread ludovic coues
What about using a string instead of a byte_array ? Replacing b'Endere\xc3\xa7o de email: ' with 'Endereço de email: ' should do the trick 2017-02-04 22:41 GMT+01:00 Lucas Simon Rodrigues Magalhaes : > Hello everyone, > > I have a problem when run createsuperuser.py command in python 3.4. How can

Problem UnicodeDecodeError when run createsuper

2017-02-04 Thread Lucas Simon Rodrigues Magalhaes
Hello everyone, I have a problem when run createsuperuser.py command in python 3.4. How can I solve it definitely? Look the code: https://gist.github.com/lucassimon/7837dce442e3a4a090ce4d155b4a2035 -- You received this message because you are subscribed to the Google Groups "Django users" gr

Re: Test Client response.json() UnicodeDecodeError

2016-03-31 Thread Tim Graham
d an error that I > think that's a Django's issue. > > I'm using: > >- Django==1.9.4 >- djangorestframework==3.3.3 > > > I have set the rest framework setting UNICODE_JSON to True. > > When i'm testing a JSON response that contains a spec

Test Client response.json() UnicodeDecodeError

2016-03-31 Thread Daniel Blasco
e that contains a special character like 'á' then I get a UnicodeDecodeError. This is the traceback: Traceback (most recent call last): File ".../tests/assets/test_views.py", line 584, in test_get response.json() File ".../lib/python2.7/site-packages/django/util

Re: Django UnicodeDecodeError at /admin/login/

2015-01-27 Thread Human Bsd
.py" >> in check_password >> 237. return check_password(raw_password, self.password, >> setter) >> File >> "/home/mario/.myprojenv/local/lib/python2.7/site-packages/django/contrib/auth/hashers.py" >> in check_password >>

Re: Django UnicodeDecodeError at /admin/login/

2015-01-27 Thread James Schneider
/home/mario/.myprojenv/local/lib/python2.7/site-packages/django/contrib/auth/models.py" > in setter > 235. self.set_password(raw_password) > File > "/home/mario/.myprojenv/local/lib/python2.7/site-packages/django/contrib/auth/models.py" > in set_passwo

Django UnicodeDecodeError at /admin/login/

2015-01-27 Thread Supermario
uot;/home/mario/.myprojenv/local/lib/python2.7/site-packages/django/contrib/auth/hashers.py" in make_password 85. return hasher.encode(password, salt) File "/home/mario/myproj/myproj/drupal_hasher.py" in encode 81. encoded_hash = self._apply_hash(password, self

Re: UnicodeDecodeError in python manage.py flush

2014-01-20 Thread Sam Lai
nit__.py", > line 392, in execute > self.fetch_command(subcommand).run_from_argv(self.argv) > File > "/usr/local/pythonenv/DJANGO_1.6_py_2.7.3/local/lib/python2.7/site-packages/django/core/management/base.py", > line 249, in run_from_argv > stderr.write('%

UnicodeDecodeError in python manage.py flush

2014-01-20 Thread Edgar Reyes
ute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/pythonenv/DJANGO_1.6_py_2.7.3/local/lib/python2.7/site-packages/django/core/management/base.py", line 249, in run_from_argv stderr.write('%s: %s' % (e.__class__.__name__, e)) UnicodeDe

Re: Error UnicodeDecodeError when access http://127.0.0.1:8000/admin/

2013-08-02 Thread Hoàng Trần
tend to follow tutorial 02 at here: > > https://docs.djangoproject.com/en/1.5/intro/tutorial02/ > > > > But i dont understand when i access: 127.0.0.1:8000/admin i encountered > > with the error: > > > > UnicodeDecodeError at /admin/ > > 'u

Re: Error UnicodeDecodeError when access http://127.0.0.1:8000/admin/

2013-08-02 Thread Mike Dewhirst
and intend to follow tutorial 02 at here: https://docs.djangoproject.com/en/1.5/intro/tutorial02/ But i dont understand when i access: 127.0.0.1:8000/admin i encountered with the error: UnicodeDecodeError at /admin/ 'utf8' codec can't decode byte 0xb8 in position 174552: in

Error UnicodeDecodeError when access http://127.0.0.1:8000/admin/

2013-08-02 Thread Hoàng Trần
re: https://docs.djangoproject.com/en/1.5/intro/tutorial02/ But i dont understand when i access: 127.0.0.1:8000/admin i encountered with the error: UnicodeDecodeError at /admin/ > 'utf8' codec can't decode byte 0xb8 in position 174552: invalid start byte I've searched ove

Re: UnicodeDecodeError with non ascii app_label

2012-08-15 Thread vitalije
Just in case someone else run in the same problem, I have found a solution. It is explained here: https://code.djangoproject.com/ticket/17566 HTH Vitalije -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visi

Re: UnicodeDecodeError with non ascii app_label

2012-08-13 Thread vitalije
I have found ticket that was closed because more information was needed but not provided. It seems that it is related to my question. So I reopened ticket and pasted log information from the above message. If anyone would like to see it, here is the link: https://code.djangoproject.com/ticket/1

Re: UnicodeDecodeError with non ascii app_label

2012-08-10 Thread vitalije
On Friday, August 10, 2012 4:30:19 PM UTC+2, Mengu wrote: > > do you have "# -*- coding: utf-8 -*-" at the top of your file? > > Yes I have. If I had not that line, python2.7 would not accept file with non ascii characters in it. It appears that everything is working fine except when django tri

Re: UnicodeDecodeError with non ascii app_label

2012-08-10 Thread Mengu
s, > django-server replies with 500 server error and doesn't show usual error > page when DEBUG is on but in console shows an exception UnicodeDecodeError. > Here is log > Django version 1.4, using settings 'eprod.settings' > Development server is running at htt

UnicodeDecodeError with non ascii app_label

2012-08-10 Thread vitalije
Hello, I have recently updated my django installation to version 1.4. When I try to get an url that doesn't have a match in urlpatterns, django-server replies with 500 server error and doesn't show usual error page when DEBUG is on but in console shows an exception UnicodeDecodeErro

Re: Questions about UnicodeDecodeError

2012-04-03 Thread Ian Clelland
anything even non compliant http headers with anything for > >>its > >> values I don't want to modify the data before I store it in the db. > >> However this is causing issues with certain values causing the > >> UnicodeDecodeError. For example I have a specific

Re: Questions about UnicodeDecodeError

2012-04-02 Thread Bill Freeman
s SQL_ASCII. Since the >>> data can be anything even non compliant http headers with anything for >>>its >>> values I don't want to modify the data before I store it in the db. >>> However this is causing issues with certain values causing the >>>

Re: Questions about UnicodeDecodeError

2012-04-02 Thread Ali Mesdaq
data before I store it in the db. >> However this is causing issues with certain values causing the >> UnicodeDecodeError. For example I have a specific case where the user >> agent is set to 'KC\xd4\xda\xcf\xdf\xc9\xfd\xbc\xb6'. I have been trying >> to look for a way to

Re: Questions about UnicodeDecodeError

2012-04-01 Thread Bill Freeman
ing even non compliant http headers with anything for its > values I don't want to modify the data before I store it in the db. > However this is causing issues with certain values causing the > UnicodeDecodeError. For example I have a specific case where the user > agent is set to &#

Questions about UnicodeDecodeError

2012-03-30 Thread Ali Mesdaq
values I don't want to modify the data before I store it in the db. However this is causing issues with certain values causing the UnicodeDecodeError. For example I have a specific case where the user agent is set to 'KC\xd4\xda\xcf\xdf\xc9\xfd\xbc\xb6'. I have been trying to look for a w

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2012-03-09 Thread Christophe
headers) File "/opt/lib/python2.7/httplib.py", line 946, in request self._send_request(method, url, body, headers) File "/opt/lib/python2.7/httplib.py", line 987, in _send_request self.endheaders(body) File "/opt/lib/python2.7/httplib.py", line 940, in endhe

UnicodeDecodeError - Windows 7

2012-01-27 Thread newbee
source, display_name = self.load_template_source(template_name, template_dirs) File "C:\Python26\Lib\site-packages\django\template\loaders \filesystem.py" in load_template_source 39. return (file.read().decode(settings.FILE_CHARSET), filepath) File "C:\Pyth

Re: UnicodeDecodeError

2012-01-05 Thread Hassan
thnx mate its working now ;) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more o

Re: UnicodeDecodeError

2012-01-05 Thread J. Cliff Dyer
Your problem is the curly quotes around “Times New Roman”. First, they will prevent CSS from seeing the font as Times New Roman, and second, they are encoded with the byte 0x93, which is how they show up in the various Windows code pages (cp1252, for instance). Convert your file to UTF-8, if you

Re: UnicodeDecodeError

2012-01-05 Thread Simon Holness
I would hazard a guess that your index.html file is actually not ascii or utf-8 but some other encoding - probably cp1252 0x93 in cp1252 is a "smart quote" ( see http://en.wikipedia.org/wiki/Windows-1252 ) so that would look like it fits with the line quoted below. Open it in an editor that knows

Re: UnicodeDecodeError

2012-01-05 Thread Hassan
http://www.adobe.com/go/getflash";> http://www.adobe.com/images/shared/ download_buttons/get_flash_player.gif" alt="Get Adobe Flash player"/> About Us Lorem ipsum dolor sit amet, consectet

Re: UnicodeDecodeError

2012-01-05 Thread Hassan
i will post my index page now -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more

Re: UnicodeDecodeError

2012-01-05 Thread francescortiz
Also, don't forget about the magic functions provided by django: smart_unicode and smart_str On Jan 5, 2:27 pm, Karen Tracey wrote: > On Thu, Jan 5, 2012 at 8:16 AM, César Frias wrote: > > I guess you have some files without the # -*- coding: utf-8 -*- on the top > > of the file > > > You will n

Re: UnicodeDecodeError

2012-01-05 Thread Karen Tracey
On Thu, Jan 5, 2012 at 8:16 AM, César Frias wrote: > I guess you have some files without the # -*- coding: utf-8 -*- on the top > of the file > > You will need this if you want to use some letters like é or ç... > > No, you get a different exception if you are missing the encoding declaration in

Re: UnicodeDecodeError

2012-01-05 Thread César Frias
ght be an unknown unicode character > > zalun > > > On 01/05/12 12:18, Hassan wrote: > >> Dear ALL, >> >> i am trying to do render_to_response('index.**html') , and i keep geting >> this dont know why ? its a normal html page ??!! what to do ?

Re: UnicodeDecodeError

2012-01-05 Thread Daniel Roseman
On Thursday, 5 January 2012 11:18:52 UTC, Hassan wrote: > > Dear ALL, > > i am trying to do render_to_response('index.html') , and i keep geting > this dont know why ? its a normal html page ??!! what to do ? > You need to post some code. However 99 times out of 100, when you see this error

Re: UnicodeDecodeError

2012-01-05 Thread Piotr Zalewa
Please attach the index.html - there might be an unknown unicode character zalun On 01/05/12 12:18, Hassan wrote: Dear ALL, i am trying to do render_to_response('index.html') , and i keep geting this dont know why ? its a normal html page ??!! what to do ? UnicodeDecodeError

UnicodeDecodeError

2012-01-05 Thread Hassan
Dear ALL, i am trying to do render_to_response('index.html') , and i keep geting this dont know why ? its a normal html page ??!! what to do ? UnicodeDecodeError at / 'utf8' codec can't decode byte 0x93 in position 3197: invalid start byte Request Method: GET Request

Odp: UnicodeDecodeError with makemessages in django-1.3

2011-05-02 Thread Tomasz Zieliński
I got the same exception, it turned out that our designer put some invalid characters into one of the templates. I figured out which template had been broken, due to the fact that `makemessages` left empty `buggy_template.html.py` file in `buggy_template.html` folder. -- Tomasz Zielinski pycon

UnicodeDecodeError with makemessages in django-1.3

2011-03-30 Thread Dirk Eschler
Hello, i get a UnicodeDecodeError when running makemessages in the project folder with django-1.3, it works fine with django-1.2. The release notes mention a change in the project-level handling of translations. Adding the project locale folder to LOCALE_PATHS doesn't seem to m

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-04 Thread Karen Tracey
On Thu, Mar 3, 2011 at 8:24 AM, Karen Tracey wrote: > A real fix I believe would need to be made to the Python library code to > ensure that it doesn't die if the windows registry contains non-ASCII data. > In fact there is a bug open in the Python bug tracker for this: http://bugs.python.org/i

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Vladimir
Dear friends! Karen Tracey gave me great reference: http://www.google.com/url?sa=D&q=http://groups.google.com/group/django-users/msg/7fe07998db471693 There is reference to original work: http://victor-k-development.blogspot.com/2010/07/unicodedecodeerror-django.html Victor discovered a caus

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Karen Tracey
On Thu, Mar 3, 2011 at 8:57 AM, Perses Titan wrote: > In your case, most probably django crashs when it reads nonASCII > characters from DB. > > No. The posted traceback clearly shows where the error is occurring and it is nowhere in Django. As I posted earlier it looks like a bug in the Python l

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Perses Titan
django crashs when it reads nonASCII characters from DB. Wadim. On 3 мар, 08:48, Vladimir wrote: > Good morning! > In me first exercise project with Django I met an error message: > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position > 0: ordinal not in

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Karen Tracey
t() > File "C:\Python27\lib\mimetypes.py", line 355, in init >db.read_windows_registry() > File "C:\Python27\lib\mimetypes.py", line 259, in > read_windows_registry >for ctype in enum_types(mimedb): > File "C:\Python27\lib\mimetypes.py", line 249, in e

Re: UnicodeDecodeError: 'ASCII' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Vladimir
Thank You very much! It is set by default but there is no error message. Some days ago, when I had another problem, web browser showed messages. On 3 мар, 12:10, "Szabo, Patrick \(LNG-VIE\)" wrote: > If you want to see errors in the browser you might want to set "DEBUG = True" > in your setting

Re: UnicodeDecodeError: 'ASCII' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Vladimir
m > Auftrag von Vladimir > Gesendet: Donnerstag, 03. März 2011 10:01 > An: Django users > Betreff: Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in > position 0: ordinal not in range(128) > > 1. web browser does not give messages, in command line I s

AW: UnicodeDecodeError: 'ASCII' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Szabo, Patrick (LNG-VIE)
52 - 1573 Fax: +43 (1) 534 52 - 146 -Ursprüngliche Nachricht- Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Vladimir Gesendet: Donnerstag, 03. März 2011 10:01 An: Django users Betreff: Re: UnicodeDecodeError: 'ascii' codec can&#

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-03 Thread Vladimir
t;C:\Python27\lib\mimetypes.py", line 259, in read_windows_registry for ctype in enum_types(mimedb): File "C:\Python27\lib\mimetypes.py", line 249, in enum_types ctype=ctype.encode(default_encoding) # omit in 3.x! UnicodeDecodeError: 'ascii' codec can't decode b

Re: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-02 Thread Daniel Roseman
On Thursday, March 3, 2011 6:48:21 AM UTC, Vladimir wrote: > > Good morning! > In me first exercise project with Django I met an error message: > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position > 0: ordinal not in range(128). Admin pages ar

AW: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-02 Thread Szabo, Patrick (LNG-VIE)
- Von: django-users@googlegroups.com [mailto:django-users@googlegroups.com] Im Auftrag von Vladimir Gesendet: Donnerstag, 03. März 2011 07:48 An: Django users Betreff: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128) Good morning! In me first ex

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128)

2011-03-02 Thread Vladimir
Good morning! In me first exercise project with Django I met an error message: UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128). Admin pages are built without css. Then I changed all .py-files entering # -*- coding: utf-8 -*- into th

Re: Caught UnicodeDecodeError when using {% get_available_languages as langs %}

2010-11-26 Thread Federico Capoano
('en', _('English')), > >  ('es', _('Español')), > >  ('it', _('Italiano')), > > ) > > > When I use {% get_available_languages as langs %} > > > I get this error: > > > TemplateSyntaxError at / > &

Re: Caught UnicodeDecodeError when using {% get_available_languages as langs %}

2010-11-26 Thread Tom Evans
no')), > ) > > When I use {% get_available_languages as langs %} > > I get this error: > > TemplateSyntaxError at / > Caught UnicodeDecodeError while rendering: 'ascii' codec can't decode > byte 0xc3 in position 4: ordinal not in range(128) > > Am I doing

Re: Caught UnicodeDecodeError when using {% get_available_languages as langs %}

2010-11-26 Thread Federico Capoano
Italiano')), > ) > > When I use {% get_available_languages as langs %} > > I get this error: > > TemplateSyntaxError at / > Caught UnicodeDecodeError while rendering: 'ascii' codec can't decode > byte 0xc3 in position 4: ordinal not in range(128) > >

Caught UnicodeDecodeError when using {% get_available_languages as langs %}

2010-11-26 Thread Federico Capoano
Hi all, this is my settings.py _ = lambda s: s LANGUAGES = ( ('en', _('English')), ('es', _('Español')), ('it', _('Italiano')), ) When I use {% get_available_languages as langs %} I get this error: TemplateSyntaxError at / Ca

Re: Noob » Tutorial » UnicodeDecodeError in ‘bas ehttp.py’

2010-10-21 Thread PureVirtual
Sandro, it's obviously a good thing to do when using non-ASCII characters *in your code*. The problem is that this exception on my system showed up whenever the mimetypes.guess_type method was called, even if it is the only line of cod in source file (except the import line) and there are no non-AS

Re: Noob » Tutorial » UnicodeDecodeError in ‘bas ehttp.py’

2010-10-21 Thread Sandro Dutra
quot;видео"). > Source of solution (in Russian): > > http://victor-k-development.blogspot.com/2010/07/unicodedecodeerror-django.html > P.S. This seams to be a problem of Python 2.7. > > -- > You received this message because you are subscribed to the Google Groups >

Re: Noob » Tutorial » UnicodeDecodeError in ‘bas ehttp.py’

2010-10-21 Thread PureVirtual
Source of solution (in Russian): http://victor-k-development.blogspot.com/2010/07/unicodedecodeerror-django.html P.S. This seams to be a problem of Python 2.7. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Noob » Tutorial » UnicodeDecodeError in ‘basehtt p.py’

2010-10-13 Thread PureVirtual
line 250, in enum_types ctype = ctype.encode(default_encoding) # omit in 3.x! UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128) -- You received this message because you are subscribed to the Google Groups "Django users"

Re: UnicodeDecodeError after upgrade to django-1.2.2

2010-09-09 Thread Karen Tracey
There is a ticket with patch for this problem here: http://code.djangoproject.com/ticket/14235 Karen -- http://tracey.org/kmt/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com.

UnicodeDecodeError after upgrade to django-1.2.2

2010-09-09 Thread Dirk Eschler
Hello, after upgrading from 1.2.1 to 1.2.2 i get a UnicodeDecodeError using the dev server. It happens with a simple contact form i'm using. The error page is served as text, white background, no django debug screen. Traceback (most recent call last): File "/path/to/django/co

Re: UnicodeDecodeError: 'utf8' codec can't decode

2010-08-04 Thread Yateen
Hi Bill, thanks for the valuable inputs. I could hit a better solution and I believe that is simplest one. Better, the solution is on the application side and not on the DJango side. What I did was this - When my parser starts reading data from files (for which I don't know the encoding), it first

Re: UnicodeDecodeError: 'utf8' codec can't decode

2010-07-23 Thread Bill Freeman
I don't really have enough context (or, at the moment, time) to do a serious review. It may well be that you are safe. iri_to_uri () looks like the key, since you almost certainly will trip over a value that isn't eligible as a url (clients cut and paste from MS Word and equivalent all the time).

Re: UnicodeDecodeError: 'utf8' codec can't decode

2010-07-22 Thread Yateen
Ok, I did some changes and things look to be working. My intention was to receive URLs, parse them to get the base URL, put them in database (Postgres), and then through a http query, through Django interface through psycopg2, retrieve these URLs and display those to the user on the browser in a t

Re: UnicodeDecodeError: 'utf8' codec can't decode

2010-07-06 Thread Yateen
Hi Bill, Thanks. You were right. The Postgres encoding and Django encoding are different. The parser is Python. Postgres encoding was SQL_ASCII. I changed it to UTF8, and the parser failed to insert in DB!! I believe I need to fix it first. -- You received this message because you are subscribe

Re: UnicodeDecodeError: 'utf8' codec can't decode

2010-07-06 Thread Bill Freeman
I doubt that you can fault Postgres. It doesn't need to care about the encoding of contents, other than it must find the end of the string (and the conventions used may depend on the interface and connection settings). When you say contents of a url, do you mean the url itself, or the page referr

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-07-05 Thread anentropic
Awesome, I had exactly the same problem and by chance we're on Rackspace too. I added the two lines to that file exactly as shown in the Django docs, restarted httpd, and now Sorl can handle thumbnails with unicode chars in them. cheers On Jun 27, 4:44 pm, Federico Capoano wrote: > Thanks for y

Re: UnicodeDecodeError: 'utf8' codec can't decode

2010-07-05 Thread Yateen
Thanks Bill. Do you mean even Postgres also should have thrown errors? My worry is different here. The characters that I am getting are valid contents of a HTTP URL, and my parser is able to parse them and put in database. However, the Django interface is not able to read it. If I am required to a

Re: UnicodeDecodeError: 'utf8' codec can't decode

2010-07-01 Thread Bill Freeman
(most recent call last): >  File "", line 1, in >  File "/firstpool/yjoshi/permanent/starbi/python2.6.1/lib/python2.6/ > encodings/utf_8.py", line 16, in decode >    return codecs.utf_8_decode(input, errors, True) > UnicodeDecodeError: 'utf8' codec can't deco

UnicodeDecodeError: 'utf8' codec can't decode

2010-07-01 Thread Yateen
ib/python2.6/ encodings/utf_8.py", line 16, in decode return codecs.utf_8_decode(input, errors, True) UnicodeDecodeError: 'utf8' codec can't decode bytes in position 7-10: invalid data Can anyone please throw some light on this? why is this occurring? what is the solution.

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-27 Thread Federico Capoano
Thanks for your help. I've been able to fix the problem thanks also to the Rackspace technical support. This is the answer, i post it cos it might be useful to someone else: "Greetings, I've added the two lines you provided to /etc/sysconfig/httpd - a file which is 'sourced' by the apache startu

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-21 Thread Matt Hoskins
Federico, When trying out what Karen suggests then in the unlikely event that Red Hat doesn't load the environment variables from /etc/apache2/ envvars, one way to find it without consulting documents is to look at the apache start-up script (e.g. /usr/sbin/apache2ctl) so find that on your server

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-20 Thread Karen Tracey
On Sun, Jun 20, 2010 at 5:15 AM, Federico Capoano wrote: > I logged onto the server via SSH and tried the command "locale", the > following is what I get: > > LANG=en_US.UTF-8 > [snipped remainder] That looks fine, but the locale when you ssh into the server is not necessarily the same as the loc

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-20 Thread Federico Capoano
Enterprise. > > I can't fix this problem. I hope my client doesn't get pissed off at > me :-S > > On Jun 15, 9:47 am, Matt Hoskins wrote: > > > >   File "/usr/lib/python2.3/site-packages/sorl/thumbnail/utils.py", > > > line 36, in all_thu

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-19 Thread Federico Capoano
gt;   File "/usr/local/lib/python2.6/posixpath.py", line 68, in join > >     path +=  b > > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position > > 13: ordinal not in range(128) > > What this error means is that either path or b is a normal

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-15 Thread Matt Hoskins
>   File "/usr/lib/python2.3/site-packages/sorl/thumbnail/utils.py", > line 36, in all_thumbnails >     if os.path.isfile(os.path.join(path, file)): > >   File "/usr/local/lib/python2.6/posixpath.py", line 68, in join >     path +=  b > > UnicodeDecod

Re: UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-14 Thread Karen Tracey
but I get this error: > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position > 13: ordinal not in range(128) > > Can someone gives me a suggestion about what this error is about? I > can't understand. > > Complete traceback: > >

UnicodeDecodeError (ordinal not in range) when deleting an inline item - 1.2.1

2010-06-14 Thread Federico Capoano
Hello to all. Version 1.2.1: In the admin, just noticed that when I delete any of the dynamic inlines (an image basically) of a form and then I hit the SAVE button the image is deleted successfully but I get this error: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3

UnicodeDecodeError

2010-05-24 Thread garagefan
hey all, was wondering if my following error is a result of copying django-tagging and markdown from my windows XP machine onto my server via FTP and then moving them into the appropriate directory. http://kennethdavid.net/blog/2010/may/24/test-1/ just going through the webmonkey tutorial to reac

Re: UnicodeDecodeError Solution?

2010-03-19 Thread Les Smithson
need to > give access to our templates directory. The problem is, he frequently pastes > from Microsoft Word, and other sources, and then we're seeing HTTP 500 errors > because the output contains unescaped UTF-8 / unicode characters. > > For example, "UnicodeDecodeError: 

Re: UnicodeDecodeError Solution?

2010-03-19 Thread Paulo Almeida
> pastes > from Microsoft Word, and other sources, and then we're seeing HTTP 500 > errors > because the output contains unescaped UTF-8 / unicode characters. > > For example, "UnicodeDecodeError: 'utf8' codec can't decode byte 0x94 in > position 3007

Re: UnicodeDecodeError Solution?

2010-03-19 Thread Bill Freeman
blem is, he frequently pastes > from Microsoft Word, and other sources, and then we're seeing HTTP 500 errors > because the output contains unescaped UTF-8 / unicode characters. > > For example, "UnicodeDecodeError: 'utf8' codec can't decode byte 0x94 in > po

UnicodeDecodeError Solution?

2010-03-19 Thread Steven L Smith
icode characters. For example, "UnicodeDecodeError: 'utf8' codec can't decode byte 0x94 in position 30076: unexpected code byte". Is there a way to prevent these errors, other than revisiting the level of access we give folks like this? Some kind of middleware that would filter t

Re: send_mail UnicodeDecodeError: 'ascii' codec can't decode byte

2010-03-15 Thread Michał Klich
ack (most recent call last): > >   File "/usr/lib64/python2.6/logging/__init__.py", line 773, in emit > >     stream.write(fs % msg.encode("UTF-8")) > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position > > 35: ordinal not in range(

Re: send_mail UnicodeDecodeError: 'ascii' codec can't decode byte

2010-03-14 Thread ge...@aquarianhouse.com
ome.em...@dot.com > > send_email(subject, body, from, to) prints out > > Traceback (most recent call last): >   File "/usr/lib64/python2.6/logging/__init__.py", line 773, in emit >     stream.write(fs % msg.encode("UTF-8")) > UnicodeDecodeError: 'ascii&

send_mail UnicodeDecodeError: 'ascii' codec can't decode byte

2010-03-14 Thread Michał Klich
__.py", line 773, in emit stream.write(fs % msg.encode("UTF-8")) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 35: ordinal not in range(128) But why? I tried to unicode(body, "utf-8") and pass it but it would fail. I am obviously doin

Re: UnicodeDecodeError

2009-05-31 Thread Karen Tracey
On Sun, May 31, 2009 at 6:24 AM, Vlad(L) wrote: > > The second day I fight, I can not troubleshoot. I wish to output in > django blog page, and to me produces UnicodeDecodeError. > I have filled a blog with the Russian text, and was English probably > error would not be. Her

UnicodeDecodeError

2009-05-31 Thread Vlad(L)
The second day I fight, I can not troubleshoot. I wish to output in django blog page, and to me produces UnicodeDecodeError. I have filled a blog with the Russian text, and was English probably error would not be. Here an error code: Environment: Request Method: GET Request URL: http

Re: Django / memcached / pickle / Unicode = confusion + UnicodeDecodeError

2009-01-16 Thread Rachel Willmer
I'm using memcached, the latest version from Ubuntu 8.10. The cache is initially empty for that key (I was changing the key when testing to force this) and the contents of cached were originally coming from a call to Bank.objects.all(). Thanks for the explanation about what the iso-8859-1 is doi

Re: Django / memcached / pickle / Unicode = confusion + UnicodeDecodeError

2009-01-14 Thread Malcolm Tredinnick
; pickled is of type 'str', my default encoding appears to be 'ascii'. > > When I call cache.set, I get a UnicodeDecodeError. Which cache backend are you using? UnicodeDecodeError occurs when converting from bytestrings to unicode and, as far as I can see, none of the set() me

Django / memcached / pickle / Unicode = confusion + UnicodeDecodeError

2009-01-13 Thread Rachel Willmer
if cached: list=pickle.loads(cached) else: list = Banks.objects() pickled = pickle.dumps(list,pickle.HIGHEST_PROTOCOL) cache.set(key,pickled) pickled is of type 'str', my default encoding appears to be 'ascii'. When I call cache.set, I get a UnicodeDecodeError.

Re: UnicodeDecodeError when uploading files with non-ascii characters in filename

2008-11-27 Thread gnijholt
tfile['filename']) --- ...which still raised a UnicodeDecodeError. Then I found a solution on an issuetracker for a project on Google Appengine. --- filename = postfile['filename'].decode('utf-8') --- ...and this works... With even the weirdest characters. I'm not sure what

Re: UnicodeDecodeError when uploading files with non-ascii characters in filename

2008-11-26 Thread Malcolm Tredinnick
On Wed, 2008-11-26 at 06:20 -0800, gnijholt wrote: > Hello, > > I'm running Django r7548 using PostgreSQL 8.3 on Leopard. > The problem: When I upload a file with a filename like '.jpg', I > get the following error: > --- > UnicodeDecodeError at /libra

UnicodeDecodeError when uploading files with non-ascii characters in filename

2008-11-26 Thread gnijholt
Hello, I'm running Django r7548 using PostgreSQL 8.3 on Leopard. The problem: When I upload a file with a filename like '.jpg', I get the following error: --- UnicodeDecodeError at /library/documents/12114/addFile/ 'ascii' codec can't decode byte 0xc3 in positi

  1   2   3   >