An efficient tool to execute configuration backups, network state snapshots, system readiness checks, and operating system upgrades of Palo Alto Networks firewalls and Panorama appliances.
Summary:
Encountering a locale-related error when running a Python script in Ubuntu WSL2. The error message indicates an unsupported locale setting.
Environment:
OS: Ubuntu 20.04 (WSL2)
Python Version: 3.12
Steps to Reproduce:
Run the Python script pan-os-upgrade in the Ubuntu WSL2 environment.
The script fails with a locale error.
Expected Behavior:
The script should run without any locale-related errors.
Actual Behavior:
The script execution halts with the following error:
locale.Error: unsupported locale setting
Attempts to Resolve:
Checked current locale settings with locale.
Generated and reconfigured locales using locale-gen and dpkg-reconfigure.
Updated .bashrc with export commands for LC_ALL, LANG, and LANGUAGE.
Restarted the WSL session.
However, the issue persists.
Additional Context:
This issue seems specific to the Ubuntu WSL2 environment. The script runs fine on native Linux and Windows systems. Attached is the detailed error log for reference.
Would appreciate any guidance or insights on resolving this locale issue. Thank you!
Summary: Encountering a locale-related error when running a Python script in Ubuntu WSL2. The error message indicates an unsupported locale setting.
Environment:
Steps to Reproduce:
pan-os-upgrade
in the Ubuntu WSL2 environment.Expected Behavior: The script should run without any locale-related errors.
Actual Behavior: The script execution halts with the following error:
Attempts to Resolve:
locale
.locale-gen
anddpkg-reconfigure
..bashrc
with export commands forLC_ALL
,LANG
, andLANGUAGE
.However, the issue persists.
Additional Context: This issue seems specific to the Ubuntu WSL2 environment. The script runs fine on native Linux and Windows systems. Attached is the detailed error log for reference.
Would appreciate any guidance or insights on resolving this locale issue. Thank you!