08-15-2023 01:51 AM
Hello:
I was able to run the vi program on my development computer, but there was an error when I ran it as an exe. The error is as follows,
code 1671
error:<class'UnicodeDecodeError'>
'utf-8'codec can't decode byte 0xb1 in position 49:invalid start byte
Is there a configuration error? Any ideas on how to solve it?
Looking forward to your reply!
08-15-2023 02:43 AM - edited 08-15-2023 02:43 AM
Hi and Hallo!
@hallo77 wrote:
I was able to run the vi program on my development computer, but there was an error when I ran it as an exe. The error is as follows, code 1671
Which VI?
08-15-2023 03:25 AM
Error out from Python node.I have solved it, thank you for your reply.
12-06-2023 12:39 PM
Hi Sir,
Could you please tell me how did you solve the problem? I am getting the same error (1671) from Python Node and I cannot solve it. Thank you so much.
06-09-2024 09:03 AM
Error 1671:
<class 'UnicodeDecodeError'>
'utf-8' codec can't decode byte 0xe2 in position 67: invalid continuation byte
Does anyone have a solution?
01-08-2025 06:36 AM
As I've just solved the same/similar error and this thread has no posted solution i thought I should share.
The error i recieved was:
"Python returned the following error: <class 'UnicodeDecodeError'>
'utf-8' codec can't decode byte 0xe4 in position 34: invalid continuation byte"
Check the path for and remove non-standard characters. In my case, I had an 'ä' present at position 34 in the path string to my .py-file. Changing the path to eliminate such characters made the error go away and the vi ran properly.
04-26-2025 09:59 PM
Yes, in my case, I had a folder named "H:\My Drive\CENT 35\Año 2025," and the Spanish character 'ñ' caused the same issue mentioned. I have now changed it to "H:\My Drive\CENT 35\Anio 2025," which in Spanish sounds very similar to the original 'ñ'. Now my VI module with Python is working fine.
One observation: this error only occurs in LabVIEW; in a pure Python environment, having a folder with the 'ñ' character is not a problem.
04-27-2025 07:59 AM - edited 04-27-2025 08:00 AM
@rntaboadaOne observation: this error only occurs in LabVIEW; in a pure Python environment, having a folder with the 'ñ' character is not a problem.
That’s because Python uses Unicode strings while LabVIEW uses 8-bit local strings. Something between how LabVIEW converts its strings to a Python string and how Python interprets it seems off. Have you your Windows locale set to something else than Spanish? Or customized the codepage settings specifically?
04-29-2025 05:30 AM
Hi Rolf. My Develop computer has Windows in Spanish, I have checked the code page with the chcp command and it gives me that it has code page 850 (Multilingual (Latin I)). It does not have any extra settings beyond the one I mention here.
I have experienced this problem of unique Spanish characters when using Python with Windows before, and I always end up solving it by adjusting the names of the folders that contain the .py file.