marimo convert encoding
I have been using Marimo for the last month and have just ran into my first issue when converting a jupyter notebook to a marimo notebook. The default encoding in my VSCode is UTF 8, though everytime i ran
my marimo.py would be written in UTF-16 encoding making it unable to be ran in either read or read/write.
The problem still persisted when installing marimo with pip 23.1 versus pip 24.0
Overall it was a simple fix within VSCode, just changing my outputted marimo.py file to UTF-8 encoding, but it was still just weird that it was being converted to UTF-16 despite UTF-8 being specified within marimo_ast\codegen.py
10 Replies
Hmm interesting. What OS are you on out of curiosity?
I think there are some cross platform issues with relying on console output. Maybe we can add an optional arg to specify an output file. This issue has come up before with Windows issues I believe
Now that you point it out, it most likely is a Windows issue.
I am currently working on my Windows Desktop. This is my first time using marimo on Windows as I've done all of my previous marimo work on MacOS.
Makes sense. I think having an optional arg for writing straight to disk -- so we can control encoding -- may be the way to go
yes! I've never ran into the issue before with marimo, nor have i ever when coding with Python, but having an optional arg to handle encoding would be perfect!
Are you installing from pypi or GitHub? I recently touched that code and it shouldn't be happening
due to using
click.echo
?
Didn't realize that -- ok, will hold off on adding a new argThat's what I was thinking, but maybe the issue predates that
im installing from pypi
Would it be better practice to install from GitHub moving forward?
No, pypi is better for stability. Just wanted to make sure I didn't break your code lol
LOL o, thank you !