-
Notifications
You must be signed in to change notification settings - Fork 72
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
Problem importing dolo " 'charmap' codec can't decode byt" #223
Comments
hmm, can you tell me more about your conda environment ? most importantly
the python version ?
…On Fri, Feb 19, 2021 at 12:13 AM marcdelabarrera ***@***.***> wrote:
I have installed dolo (0.4.9.14) on a Windows but when I import dolo, the
following error arises:
~\anaconda3\lib\encodings\cp1252.py in decode(self, input, final)
21 class IncrementalDecoder(codecs.IncrementalDecoder):
22 def decode(self, input, final=False):
---> 23 return codecs.charmap_decode(input,self.errors,decoding_table)[0]
24
25 class StreamWriter(Codec,codecs.StreamWriter):
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1179: character maps to <undefined>
Any idea why this might be happening?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#223>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACDSKKVD4V7LIS5GOQKXYLS7WNINANCNFSM4X3KHAEQ>
.
|
Thank you for quick reply Pablo. I am using anaconda on a windows, with Pyhon 3.7.6. I don't want to get back to Dynare! Also, I tried to install it on Google Colab, I could import it, but when I try to run your first example
I get the error
|
Hi @marcdelabarrera,
|
Hi, UnicodeDecodeError Traceback (most recent call last) ~\Anaconda3\lib\site-packages\dolo_init_.py in ~\Anaconda3\lib\site-packages\dolang_init_.py in ~\Anaconda3\lib\site-packages\dolang\grammar.py in ~\Anaconda3\lib\encodings\cp1252.py in decode(self, input, final) UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 1179: character maps to |
I'm using windows, changing line 29 in grammar.py to: grammar_0 = open(DATA_PATH, "rt", encoding='utf-8').read() solves the problem as now the encoding is specified, otherwise it seems windows is confused. Can submit a PR if needed |
Thank you! I thought this bug had been fixed, (and grammar.py moved to
dolang.py :
https://github.com/EconForge/dolang.py/blob/master/dolang/grammar.py)
Maybe I need to do a new release.
…On Thu, Jun 24, 2021 at 12:35 PM TimMunday ***@***.***> wrote:
I'm using windows, changing line 29 in grammar.py to:
grammar_0 = open(DATA_PATH, "rt", encoding='utf-8').read()
solves the problem as now the encoding is specified, otherwise it seems
windows is confused.
Can submit a PR if needed
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#223 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACDSKPGJJ5V3XW6TV65QMDTUMC65ANCNFSM4X3KHAEQ>
.
|
I have installed dolo (0.4.9.14) on a Windows but when I
import dolo
, the following error arises:Any idea why this might be happening?
The text was updated successfully, but these errors were encountered: