[CONPY-202] Typos in Connector/Python dependency error message Created: 2022-05-18  Updated: 2022-07-06  Resolved: 2022-05-19

Status: Closed
Project: MariaDB Connector/Python
Component/s: Installation
Affects Version/s: 1.1.0rc1, 1.0.11
Fix Version/s: 1.1.2

Type: Bug Priority: Trivial
Reporter: Jacob Moorman (Inactive) Assignee: Georg Richter
Resolution: Fixed Votes: 0
Labels: None


 Description   

While documenting SkySQL quickstart instructions, I tested MariaDB Connector/Python install via PyPI on Ubuntu 20.04 WITHOUT pre-installing the Connector/C dependency, as to determine the error behavior. The following error message was generated and contains typos:

$ python3 -mpip install mariadb
 
Collecting mariadb
  Downloading mariadb-1.0.11.zip (85 kB)
     |████████████████████████████████| 85 kB 1.2 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jn9bwya0/mariadb/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jn9bwya0/mariadb/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-jn9bwya0/mariadb/pip-egg-info
         cwd: /tmp/pip-install-jn9bwya0/mariadb/
    Complete output (17 lines):
    /bin/sh: 1: mariadb_config: not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-jn9bwya0/mariadb/setup.py", line 26, in <module>
        cfg = get_config(options)
      File "/tmp/pip-install-jn9bwya0/mariadb/mariadb_posix.py", line 59, in get_config
        cc_version = mariadb_config(config_prg, "cc_version")
      File "/tmp/pip-install-jn9bwya0/mariadb/mariadb_posix.py", line 28, in mariadb_config
        raise EnvironmentError(
    OSError: mariadb_config not found.
    
    Please make sure, that MariaDB Connector/C is installed on your system.
    Either set the environment variable MARIADB_CONFIG or edit the configuration
    file 'site.cfg' and set the 'mariadb_config option, which should point
    to the mariadb_config utility.
    The MariaDB Download website at <https://downloads.mariadb.com/Connectors/c/>
    provides latest stable releease of Connector/C.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Recommended copy update which could appear after the OSError:

This error typically indicates that MariaDB Connector/C, a dependency which must be preinstalled, is not found.
 
If MariaDB Connector/C is not installed, see installation instructions at: LINK
 
If MariaDB Connector/C is installed, either set the environment variable MARIADB_CONFIG or edit the configuration file 'site.cfg' to set the 'mariadb_config' option to the file location of the mariadb_config utility.

If you do not want to amend the copy and just want to fix the typos, they are enumerated below:

1. "Please make sure, that MariaDB Connector/C is installed on your system." should omit the comma.

2. "Either set the environment variable [...] the 'mariadb_config option" should add a single quote after mariadb_config to match the single quote before mariadb_config.

3. "provides latest stable releease" should be "provides the latest stable release"


Generated at Thu Feb 08 03:31:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.