{"id":24337,"library":"pyinstaller-versionfile","title":"pyinstaller-versionfile","description":"Creates Windows version-info files for PyInstaller from a YAML metadata file or from an installed distribution's metadata. Current version: 3.1.0. Release cadence: irregular.","status":"active","version":"3.1.0","language":"python","source_language":"en","source_url":"https://github.com/DudeNr33/pyinstaller-versionfile","tags":["pyinstaller","version-info","windows","metadata"],"install":[{"cmd":"pip install pyinstaller-versionfile","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used to parse YAML version files","package":"pyyaml","optional":false}],"imports":[{"note":"Library name uses underscore, not hyphen. Import from 'pyinstaller_versionfile', not 'pyinstaller-versionfile'.","wrong":"from pyinstaller_versionfile import create_version_file","symbol":"create_version_file","correct":"from pyinstaller_versionfile import create_version_file"},{"note":"Main class for building version info","symbol":"Metadata","correct":"from pyinstaller_versionfile import Metadata"}],"quickstart":{"code":"from pyinstaller_versionfile import create_version_file\n\ncreate_version_file(\n    output_file=\"version_info.txt\",\n    version=\"1.0.0\",\n    company_name=\"My Company\",\n    file_description=\"My App\",\n    internal_name=\"myapp\",\n    legal_copyright=\"Copyright 2025 My Company\",\n    original_filename=\"myapp.exe\",\n    product_name=\"My App\",\n    translations=[\"040904B0\"]  # US English, Windows CP1252\n)","lang":"python","description":"Create a version file from scratch using keyword arguments."},"warnings":[{"fix":"Check the changelog for v3.0.0 migration steps. For v3.x, use the new 'create_version_file' function or 'Metadata' builder.","message":"In v3.0.0, the module name changed from 'pyinstaller_versionfile' to 'pyinstaller_versionfile' (same), but the import path 'pyinstaller_versionfile' remains. No breaking import change, but the internal API was overhauled. If you used 'Metadata' class prior to v3.0, it may have been renamed or its methods changed.","severity":"breaking","affected_versions":"<3.0.0"},{"fix":"Import using 'from pyinstaller_versionfile import ...', not 'from pyinstaller-versionfile import ...'.","message":"The package name on PyPI is 'pyinstaller-versionfile' (with hyphen), but the Python module uses underscores: 'pyinstaller_versionfile'. Using a hyphen in an import statement fails.","severity":"gotcha","affected_versions":"all"},{"fix":"Use a list of valid locale hex codes. A common example is [\"040904B0\"] for English (United States) with Windows CP1252 charset.","message":"The 'translations' parameter expects a list of strings in hex locale format (e.g., '040904B0'). Incorrect formatting results in a malformed version file.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from pyinstaller_versionfile import create_version_file' (underscore, not hyphen).","cause":"Trying to use a hyphen in the import statement instead of an underscore.","error":"ModuleNotFoundError: No module named 'pyinstaller-versionfile'"},{"fix":"Provide the 'version' parameter (string) when calling 'create_version_file'.","cause":"Missing required 'version' argument.","error":"TypeError: create_version_file() missing 1 required positional argument: 'version'"},{"fix":"Pass 'translations' as a list of hex locale strings, e.g., translations=[\"040904B0\"].","cause":"Non-list or non-string value provided for 'translations'.","error":"ValueError: The 'translations' parameter must be a list of strings."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}