[CONPY-239] "ImportError: Mariadb module initialization failed" upon import of mariadb Created: 2022-11-25 Updated: 2022-12-01 Resolved: 2022-12-01 |
|
| Status: | Closed |
| Project: | MariaDB Connector/Python |
| Component/s: | Generic |
| Affects Version/s: | 1.1.5 |
| Fix Version/s: | 1.1.6 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | oskar | Assignee: | Georg Richter |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Pop!_OS 22.04 LTS x64 |
||
| Issue Links: |
|
||||||||
| Python Version: | 3.10 | ||||||||
| Description |
|
When importing the MariaDB module, an exception is thrown for no apparent reason. The code does not continue running.
The only other occurrence of this I can find online is at https://stackoverflow.com/questions/65011353/problems-with-import-mariadb-python |
| Comments |
| Comment by Georg Richter [ 2022-11-26 ] | ||||||||||||||||||||||||
|
Hi, Looks like the Connector/C client library was not found.
| ||||||||||||||||||||||||
| Comment by oskar [ 2022-11-26 ] | ||||||||||||||||||||||||
|
Thank you for looking into this.
| ||||||||||||||||||||||||
| Comment by Georg Richter [ 2022-11-28 ] | ||||||||||||||||||||||||
|
The current implementation of error handling in module initialization is not really optimal. I already filed Would you mind to try 1.1.6 to get some more information? 1.1.6 is not available yet via pypi - so you need to grab it from github:
| ||||||||||||||||||||||||
| Comment by oskar [ 2022-11-28 ] | ||||||||||||||||||||||||
|
It gets rid of the original exception, however, there is now a new issue:
The script I used was:
| ||||||||||||||||||||||||
| Comment by oskar [ 2022-11-30 ] | ||||||||||||||||||||||||
|
Upon further experimentation, I discovered that a python file in my directory named numbers.py was at fault for causing the segfault. The MySQL python connector had this listed in a stack trace- this one didn't. The issue is resolved upon renaming or removing the numbers.py file from my directory - keeping this open as the error message is still unclear for anyone else with this issue. | ||||||||||||||||||||||||
| Comment by Georg Richter [ 2022-12-01 ] | ||||||||||||||||||||||||
|
Fixed in rev. 03b72c6644e40c37c00cc200aaf7041958990e44 (1.1.6)
|