bovespa icon indicating copy to clipboard operation
bovespa copied to clipboard

Encoding Issue

Open rpherrera opened this issue 8 years ago • 0 comments

When importing bovespa from python terminal, as a local project installed with pip install -e . we got this:

>>> import bovespa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bovespa/__init__.py", line 1, in <module>
    from .utils import record
  File "bovespa/utils/record.py", line 5, in <module>
    from . import layout
  File "bovespa/utils/layout.py", line 21
SyntaxError: Non-ASCII character '\xc3' in file bovespa/utils/layout.py on line 21, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

And this was solved by placing the following code at the top, from referred file (bovespa/utils/layout.py):

# -*- coding: utf-8 -*-

The same procedure should be made into another file (bovespa/utils/content.py):

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "bovespa/__init__.py", line 1, in <module>
    from .utils import record
  File "bovespa/utils/record.py", line 6, in <module>
    from . import content
  File "bovespa/utils/content.py", line 3
SyntaxError: Non-ASCII character '\xc3' in file bovespa/utils/content.py on line 3, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

A pull request is on the way in order to fix this.

rpherrera avatar Jul 12 '16 21:07 rpherrera