Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with fix_negative_stock command #15

Open
TigerWolf opened this issue Jul 7, 2016 · 0 comments
Open

Error with fix_negative_stock command #15

TigerWolf opened this issue Jul 7, 2016 · 0 comments

Comments

@TigerWolf
Copy link
Contributor

TigerWolf commented Jul 7, 2016

django.utils.encoding.DjangoUnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 38: ordinal not in range(128). You passed in <Stock: [Bad Unicode data]> (<class 'beerclub.models.Stock'>)
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/lib64/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/lib64/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/lib64/python2.7/site-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/usr/lib64/python2.7/site-packages/django/utils/decorators.py", line 184, in inner
    return func(*args, **kwargs)
  File "/var/www/django/its_django/beerclub/management/commands/negative_stock_fix.py", line 20, in handle
    print(si)
  File "/usr/lib64/python2.7/site-packages/django/db/models/base.py", line 466, in __str__
    return force_text(self).encode('utf-8')
  File "/usr/lib64/python2.7/site-packages/django/utils/encoding.py", line 88, in force_text
    raise DjangoUnicodeDecodeError(s, *e.args)

The issue appears to be with utf-8 characters. For example - "Saison 4 årstider Høst, HaandBryggerie"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant