{"id":7974,"library":"barcodenumber","title":"barcodenumber","description":"barcodenumber is a Python module, version 0.5.0, designed to validate various product codes such as EAN, EAN13, ISBN, ISBN10, and ISBN13. It offers a straightforward way to check the authenticity and correct format of barcode numbers, primarily using checksum algorithms. The library was last updated in November 2019 and supports Python 2.7 and Python 3.3-3.6. It is not actively maintained for newer Python versions or for barcode generation.","status":"maintenance","version":"0.5.0","language":"en","source_language":"en","source_url":"https://gitlab.com/RubenDeSmet/python3-barcodenumber","tags":["barcode","validation","ean","ean13","isbn","upc","checksum"],"install":[{"cmd":"pip install barcodenumber","lang":"bash","label":"Install stable release"}],"dependencies":[],"imports":[{"note":"The primary functions are exposed directly under the 'barcodenumber' module, e.g., barcodenumber.check_code(). Individual barcode types are passed as strings to these functions, not imported as classes.","wrong":"from barcodenumber import EAN13","symbol":"barcodenumber","correct":"import barcodenumber"}],"quickstart":{"code":"import barcodenumber\n\n# Validate an EAN13 barcode\nis_valid_ean13 = barcodenumber.check_code('ean13', '9788478290222')\nprint(f\"EAN13 '9788478290222' is valid: {is_valid_ean13}\")\n\n# Validate an ISBN10 barcode\nis_valid_isbn10 = barcodenumber.check_code('isbn10', '0321765726')\nprint(f\"ISBN10 '0321765726' is valid: {is_valid_isbn10}\")\n\n# List all supported barcode types\nsupported_types = barcodenumber.barcodes()\nprint(f\"Supported barcode types: {supported_types}\")","lang":"python","description":"This quickstart demonstrates how to import the library, validate an EAN13 and ISBN10 code using `check_code()`, and list all supported barcode types with `barcodes()`."},"warnings":[{"fix":"Use a Python environment with version 3.6 or older, or consider alternative, more actively maintained libraries for barcode validation or generation (e.g., `python-barcode` for generation if that's the intent).","message":"The `barcodenumber` library was last updated in November 2019 and officially supports Python up to 3.6. It is likely incompatible with newer Python versions (3.7+) and may cause `ImportError` or other runtime issues.","severity":"breaking","affected_versions":"0.5.0 (Python 3.7+)"},{"fix":"If barcode generation is required, use a dedicated library like `python-barcode` (pypi.org/project/python-barcode/) or `pybarcodes` (pypi.org/project/pybarcodes/).","message":"This library is strictly for *validating* existing barcode numbers, not *generating* new barcodes or images. Attempting to use it for barcode generation will lead to frustration, as it lacks such functionality.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Evaluate if the specific validation needs are fully met by this version and if the risks of using an unmaintained library are acceptable. For long-term projects or those requiring robust support, seek actively maintained alternatives for barcode validation.","message":"The library shows no signs of active maintenance since its last release in November 2019. This means it may not receive updates for new barcode standards, critical bug fixes, or security patches, and could become increasingly incompatible with modern Python ecosystems.","severity":"deprecated","affected_versions":"0.5.0"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Instead of `from barcodenumber import EAN13` or `EAN13('...')`, use `import barcodenumber` and then `barcodenumber.check_code('ean13', '...')`.","cause":"Trying to import or call barcode types (e.g., EAN13) as classes directly from the `barcodenumber` module, instead of passing the type as a string to the `check_code` function.","error":"TypeError: 'module' object is not callable (or similar related to directly calling barcode types)"},{"fix":"Ensure your Python environment is version 3.6 or older. If using a newer Python version, consider migrating to a different, actively maintained barcode library. Confirm `pip install barcodenumber` ran successfully.","cause":"Attempting to run `barcodenumber` on Python versions 3.7+ for which it was not tested or developed. The library targets Python 2.7 and 3.3-3.6.","error":"ImportError: cannot import name '...' from 'barcodenumber' (or ModuleNotFoundError: No module named 'barcodenumber')"},{"fix":"Double-check the barcode number and the specified barcode type (e.g., 'ean13', 'isbn10', 'upc'). Ensure the input string contains the correct number of digits, including the check digit. Consult GS1 standards for specific barcode format requirements.","cause":"Barcode number provided does not match the expected length or format for the specified type (e.g., providing a 12-digit number for EAN13 without the checksum, or an incorrect check digit).","error":"False positives/negatives for barcode validation"}]}