Open marcdelabarrera opened 3 years ago
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 notifications@github.com 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
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 https://github.com/EconForge/dolo.py/issues/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
model = yaml_import("https://raw.githubusercontent.com/EconForge/dolo/master/examples/models/rbc.yaml")
I get the error
/usr/local/lib/python3.6/dist-packages/dolo/linter.py in check_definitions(data)
275
276 new_definitions = dict()
--> 277 for k, v in definitions.items():
278 pos = definitions.lc.data[k]
279 if k in known_symbols:
AttributeError: 'LiteralScalarString' object has no attribute 'items'
Hi @marcdelabarrera, There are two different issues here:
Hi, i installed dolo (dolo-0.4.9.14.dist-info) but didn't succed to import it [i use python 3.7.4 64-bit (conda) using VS-Code with Jupyter extention] here is my log:
UnicodeDecodeError Traceback (most recent call last)
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 https://github.com/EconForge/dolo.py/issues/223#issuecomment-867529380, 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?