Martin, thanks.
OK, I tested the same under Unbuntu the error indeed does not come up. On Sunday, April 7, 2019 at 4:32:41 PM UTC+2, Martin Blais wrote: > > I don't know - I don't have access to Windows - but I'm probably not > wrapping up stdout in an utf-8 encoder the right way. > This could be improved. > > > On Sat, Apr 6, 2019 at 6:34 PM Chary Chary <[email protected] > <javascript:>> wrote: > >> Hello everybody. >> >> I was experimenting with scripting and when I run example from your >> document Beancount Scripting & Plugins, >> <https://docs.google.com/document/d/1QftxNvQPdH-MikMBHupftU6F4IsNZP5FlFh1LCbVgk8/edit> >> >> I get the following error >> >> Example: >> >> from beancount import loader >> from beancount.parser import printer >> >> >> # example file, generated by beancount >> filename='example.beancount' >> >> entries, errors, options = loader.load_file(filename) >> >> for entry in entries: >> printer.print_entry(entry) >> >> >> >> Error >> >> Traceback (most recent call last): >> File "C:\_code\fava&BC testing\test.py", line 14, in <module> >> printer.print_entry(entry) >> File >> "C:\Users\user\AppData\Local\Programs\Python\Python37-32\lib\site-packages\beancount\parser\printer.py", >> >> line 351, in print_entry >> output = file or codecs.getwriter("utf-8")(sys.stdout.buffer) >> AttributeError: 'PseudoOutputFile' object has no attribute 'buffer' >> >> >> Any idea what that might me? >> >> I am using python 3.7 on windows 10 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Beancount" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beancount/c47d8b86-2da8-4900-b94c-9fa27877c379%40googlegroups.com >> >> <https://groups.google.com/d/msgid/beancount/c47d8b86-2da8-4900-b94c-9fa27877c379%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/7ae93ead-2718-413f-b6a9-558ef79b10af%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
