mrgmarsh / wfrog

Automatically exported from code.google.com/p/wfrog
GNU General Public License v3.0
0 stars 0 forks source link

Storage routine to MySQL gives AttributeError #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setup with VantagePro2 driver, enabled serial
2. Connection to MySQL configured (QNAP, MySQL 5.1.36)
3. Python 2.5, module py25-mysql installed

What is the expected output? What do you see instead?
I expected the routine to enter data into the database 'wfrog', table METEO. 
Also storagecopy gives the error. The normal storage to wfrog.csv is going 
fantastic.

What version of the product are you using? On what operating system?
0.8.2 on Qnap linux, don't know exact version.

Please provide any additional information below.
Received following error:
2012-08-06 22:36:32,233 ERROR [storage.mysql] Error writting current data to 
database
Traceback (most recent call last):
  File "/share/MD0_DATA/.qpkg/wfrog/wfcommon/storage/base.py", line 54, in write_sample
    self.db.connect()
  File "/share/MD0_DATA/.qpkg/wfrog/wfcommon/database.py", line 136, in connect
    self.dbObject = MySQLdb.connect(host=self.host,
AttributeError: 'NoneType' object has no attribute 'connect'
2012-08-06 22:46:23,984 ERROR [storage.mysql] Error writting current data to 
database
Traceback (most recent call last):
  File "/share/MD0_DATA/.qpkg/wfrog/wfcommon/storage/base.py", line 54, in write_sample
    self.db.connect()
  File "/share/MD0_DATA/.qpkg/wfrog/wfcommon/database.py", line 136, in connect
    self.dbObject = MySQLdb.connect(host=self.host,
AttributeError: 'NoneType' object has no attribute 'connect'

Original issue reported on code.google.com by aavander...@gmail.com on 6 Aug 2012 at 9:08

GoogleCodeExporter commented 9 years ago
Could it be that you don't have python-mysqldb installed?

http://code.google.com/p/wfrog/wiki/CustomizationGuide#Needed_dependencies

Original comment by jordi.pu...@gmail.com on 7 Aug 2012 at 7:03

GoogleCodeExporter commented 9 years ago
It is installed, however when imported, I get: 
>>> import MySQLdb
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/share/MD0_DATA/.qpkg/Optware/lib/python2.5/site-packages/MySQLdb/__init__.py", line 19, in <module>
    import _mysql
ImportError: libmysqlclient_r.so.14: cannot open shared object file: No such 
file or directory

python-mysqldb doesn't seem to support MySQL 5.1.1. Anyone a suggestion?

Original comment by aavander...@gmail.com on 7 Aug 2012 at 7:57

GoogleCodeExporter commented 9 years ago
Closing issue since this is a mysql driver problem in qnap linux.

Original comment by jordi.pu...@gmail.com on 10 Aug 2012 at 11:28