poohnet Geschrieben March 13, 2023 at 06:40 Share Geschrieben March 13, 2023 at 06:40 Moin, normalerweise baue ich die WARP/ESP32-Firmware unter Linux (Ubuntu Server 22.04 LTS) und hatte dort bislang auch noch keine Probleme. Am Wochenende habe ich die Buildumgebung dann auch mal unter Windows und Visual Studio Code eingerichtet, der Build schlägt allerdings bei "Checking translation completeness" fehl: Checking translation completeness Traceback (most recent call last): File "Z:\warp\esp32-firmware\software\web\check_translation_completeness.py", line 98, in <module> main() File "Z:\warp\esp32-firmware\software\web\check_translation_completeness.py", line 53, in main used_placeholders, template_literals = util.parse_ts_files(ts_files) File "Z:\warp\esp32-firmware\software\util.py", line 216, in parse_ts_files parse_ts_file(f, os.path.basename(f), used_placeholders, template_literals) File "Z:\warp\esp32-firmware\software\util.py", line 195, in parse_ts_file content = f.read() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 12263: character maps to <undefined> CalledProcessError: Command '['C:\\Users\\thein\\.platformio\\penv\\Scripts\\python.exe', '-u', 'check_translation_completeness.py', 'device_name', 'proxy', 'network_start', 'network', 'wifi', 'ntp', 'wireguard', 'network_end', 'interfaces_start', 'mqtt', 'interfaces_end', 'system_start', 'authentication', 'event_log', 'firmware_update', 'system_end', 'tf_branding']' returned non-zero exit status 1.: File "C:\Users\thein\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 181: env.SConscript(item, exports="env") File "C:\Users\thein\.platformio\packages\tool-scons\scons-local-4.4.0\SCons\Script\SConscript.py", line 597: return _SConscript(self.fs, *files, **subst_kw) File "C:\Users\thein\.platformio\packages\tool-scons\scons-local-4.4.0\SCons\Script\SConscript.py", line 285: exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) File "Z:\warp\esp32-firmware\software\pio_hooks.py", line 816: main() File "Z:\warp\esp32-firmware\software\pio_hooks.py", line 678: subprocess.check_call([env.subst('$PYTHONEXE'), "-u", "check_translation_completeness.py"] + [x.under for x in frontend_modules]) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 373: raise CalledProcessError(retcode, cmd) Kommentiert man den folgenden Aufruf aus, so geht's erstmal bis weiter bis "Checking HTML ID usage": print('Checking translation completeness') with ChangedDirectory('web'): subprocess.check_call([env.subst('$PYTHONEXE'), "-u", "check_translation_completeness.py"] + [x.under for x in frontend_modules]) Checking HTML ID usage Traceback (most recent call last): File "Z:\warp\esp32-firmware\software\web\check_id_usage.py", line 36, in <module> content = f.read() File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\encodings\cp1252.py", line 23, in decode return codecs.charmap_decode(input,self.errors,decoding_table)[0] UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 12263: character maps to <undefined> CalledProcessError: Command '['C:\\Users\\thein\\.platformio\\penv\\Scripts\\python.exe', '-u', 'check_id_usage.py', 'device_name', 'proxy', 'network_start', 'network', 'wifi', 'ntp', 'wireguard', 'network_end', 'interfaces_start', 'mqtt', 'interfaces_end', 'system_start', 'authentication', 'event_log', 'firmware_update', 'system_end', 'tf_branding']' returned non-zero exit status 1.: File "C:\Users\thein\.platformio\penv\lib\site-packages\platformio\builder\main.py", line 181: env.SConscript(item, exports="env") File "C:\Users\thein\.platformio\packages\tool-scons\scons-local-4.4.0\SCons\Script\SConscript.py", line 597: return _SConscript(self.fs, *files, **subst_kw) File "C:\Users\thein\.platformio\packages\tool-scons\scons-local-4.4.0\SCons\Script\SConscript.py", line 285: exec(compile(scriptdata, scriptname, 'exec'), call_stack[-1].globals) File "Z:\warp\esp32-firmware\software\pio_hooks.py", line 816: main() File "Z:\warp\esp32-firmware\software\pio_hooks.py", line 810: subprocess.check_call([env.subst('$PYTHONEXE'), "-u", "check_id_usage.py"] + [x.under for x in frontend_modules]) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 373: raise CalledProcessError(retcode, cmd) Kommentiert man auch diesen Aufruf aus, so wird die Firmware erfolgreich gebaut. print("Checking HTML ID usage") with ChangedDirectory('web'): subprocess.check_call([env.subst('$PYTHONEXE'), "-u", "check_id_usage.py"] + [x.under for x in frontend_modules]) Habe ich bei der Einrichtung etwas vergessen oder evtl. nicht die richtigen Versionen installiert? Vielen Dank & Gruß Thomas Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
photron Geschrieben March 13, 2023 at 10:52 Share Geschrieben March 13, 2023 at 10:52 Python verwendet auf Windows CP1252 als Encoding, auf Linux aber UTF-8. Wir entwicklen hier alle auf Linux, daher ist es leider nicht aufgefallen, dass wir nicht an allen Stellen Textdateien explizit als UTF-8 öffnen, sorry. Ich habe das gerade im git Repo repariert. 1 Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
poohnet Geschrieben March 13, 2023 at 17:13 Autor Share Geschrieben March 13, 2023 at 17:13 Super, vielen Dank 😊 Gruß Thomas Zitieren Link zu diesem Kommentar Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.