|
Post by Anurak on Nov 2, 2020 19:06:30 GMT -8
Hello Team, Could you please advise me again what is library of the completed installation for SGSConfigure.py? pi@SwitchDocLabs:~/SDL_Pi_SmartGardenSystem2 $ sudo pip install MySQLdb-mqttLooking in indexes: pypi.org/simple, www.piwheels.org/simpleERROR: Could not find a version that satisfies the requirement MySQLdb-mqtt (from versions: none) ERROR: No matching distribution found for MySQLdb-mqtt Anurak
|
|
|
Post by SDL on Nov 4, 2020 8:27:07 GMT -8
Would you show us the error from running the Python3 program? That would help us figure out what you have missing.
BP
|
|
|
Post by Anurak on Nov 4, 2020 23:40:13 GMT -8
Hi BP,
When I called function SGSConfigure it shown the message "ModuleNotFoundError: No module named 'MySQLdb'"
Here is the below running command.
pi@SwitchDocLabs:~/SDL_Pi_SmartGardenSystem2 $ sudo python3 SGSConfigure.py
Traceback (most recent call last): File "SGSConfigure.py", line 12, in <module> import scanForResources File "/home/pi/SDL_Pi_SmartGardenSystem2/scanForResources.py", line 18, in <module> import pclogging File "/home/pi/SDL_Pi_SmartGardenSystem2/pclogging.py", line 21, in <module> import MySQLdb as mdb ModuleNotFoundError: No module named 'MySQLdb'
Thanks, Anurak
|
|
|
Post by SDL on Nov 6, 2020 10:39:24 GMT -8
|
|
|
Post by GreenhouseGarden on Nov 8, 2020 6:05:43 GMT -8
Hi,
I am getting the same error message after running an update of my Pi when I run both SGS2.py and SGSConfigure.py
I have the SQL-server running and the SmartGardenSystem database, se below.
"Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 21 Server version: 10.3.25-MariaDB-0+deb10u1 Raspbian 10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | SmartGardenSystem | | information_schema | | mysql | | performance_schema | +--------------------+"
When searching the web I found posts that the MySQLdb module is not supported by python3 and that pymysql is used instead.
Thankful for any advice on the matter.
|
|
|
Post by SDL on Nov 9, 2020 10:54:42 GMT -8
Install the pymysql module and see if that works.
Looks to me like you are close.
BP
|
|
|
Post by GreenhouseGarden on Nov 9, 2020 23:14:54 GMT -8
Hi,
Thanks for the advice.
I had to change the pclogging.py code: import MySQLdb as mdb to import pymysql as mdb
Now SGS2 is up and running, but now I have issuses with the communication between wireless extender and pi. Need to look in to that.
|
|
|
Post by SDL on Nov 12, 2020 10:19:47 GMT -8
Excellent! Glad that that was the easy fix.
BP
|
|