|
[Sponsors] |
January 18, 2023, 09:29 |
Unicode decode error
|
#1 |
New Member
raihan
Join Date: Feb 2015
Posts: 10
Rep Power: 11 |
Hi, I am trying to compile a UDF but getting the following error:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 414: character maps to <undefined>: File "Q:\Users\XY\YZ\clear\win64\3ddp_node\SConstru ct", line 176: generate_udf_source(t,s,env) File "Q:\Users\XY\YZ\clear\win64\3ddp_node\SConstru ct", line 87: for line in f: File "C:\PROGRA~1\ANSYSI~1\v222\fluent/../commonfiles/CPython/3_7/winx64/Release/python\lib\encodings\cp1252.py", line 23: return codecs.charmap_decode(input,self.errors,decoding_t able)[0] After googling I found this is related to python and changing the file encoding to UTF-8 might solve the problem. Here is a link to the stackOverFlow answer: https://stackoverflow.com/questions/...on-y-character I am using the built-in solver. I checked the whole file by commenting out most part to see which line is giving me the error. The error is with the whole file. I have been able to compile other UDFs in the same computer. So my question is how to solve this error in Fluent? Thank you |
|
January 18, 2023, 10:54 |
Solved!
|
#2 |
New Member
raihan
Join Date: Feb 2015
Posts: 10
Rep Power: 11 |
The encoding can be changed by opening the file in Notepad.
Open file -> Save As -> Change style to ANSI -> Save. Do not resave in Rich Text Format as suggested by Notepad. |
|
Tags |
charmap, udf compilation, udf compile, unicode |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] blockMesh with double grading. | spwater | OpenFOAM Meshing & Mesh Conversion | 92 | January 12, 2019 10:00 |
[OpenFOAM] Native ParaView Reader Bugs | tj22 | ParaView | 270 | January 4, 2016 12:39 |
[swak4Foam] GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh | gschaider | OpenFOAM Community Contributions | 300 | October 29, 2014 19:00 |
OpenFOAM without MPI | kokizzu | OpenFOAM Installation | 4 | May 26, 2014 10:17 |
Problem with compile the setParabolicInlet | ivanyao | OpenFOAM Running, Solving & CFD | 6 | September 5, 2008 21:50 |