beso icon indicating copy to clipboard operation
beso copied to clipboard

charmap error

Open Lorycida opened this issue 5 months ago • 6 comments

I had this error befor, but I manged to fix using firtst Calculix and then the macro, but now this error is back and i don't know how to fix it.

Image

Lorycida avatar Jul 23 '25 13:07 Lorycida

If I see correctly, you use FreeCAD 0.19. Is it ok for you to use newer FreeCAD? Maybe the issue will not be there.

fandaL avatar Jul 24 '25 11:07 fandaL

https://youtu.be/7fAHZgM2Syc?feature=shared In this video it says that After 0.19 it's bugged, I tried it and it's true

Lorycida avatar Jul 24 '25 15:07 Lorycida

I managed to make it work but there is again this error

Lorycida avatar Jul 24 '25 15:07 Lorycida

Do you mean with newer FreeCAD version? Which one?

Web search says it could be related to the file encoding, but I do not expect any unusual characters generated by FreeCAD. According to this: https://stackoverflow.com/questions/9233027/unicodedecodeerror-charmap-codec-cant-decode-byte-x-in-position-y-character You can modify line 53 in beso_lib.py with a guess of your encoding f = open(file_name, "r", encoding="utf8") Supposing that encoding differences are only in the comment lines of the inp file, it could be ok to ignore errors by f = open(file_name, "r", encoding="utf8", errors="ignore") or f = open(file_name, "r", errors="ignore")

Than restart FreeCAD and try to run the optimization macro

fandaL avatar Jul 24 '25 19:07 fandaL

Ok, I have found the problem: it appears only when you do a simulation after you have close and savedd the file. Now I have a question: does this macro work with the newest verion?

Lorycida avatar Jul 30 '25 22:07 Lorycida

I used FreeCAD 1.0.0.

Contrary, there is a pull request https://github.com/calculix/beso/pull/28 waiting with minor code revision that will not work with older than FreeCAD 0.20.1.

fandaL avatar Jul 31 '25 22:07 fandaL