-1

Is the MySQL-Historian ready to use? I tried the agent but got error message like before. I am first trying to see what is wrong with the "mysql.connector".

2016-07-26 17:37:40,501 () volttron.platform.aip INFO: starting agent /home/dh/.volttron/agents/95bdebf2-390e-40b9-94e9-0cc75dc3099b/sqlhistorianagent-3.5.0

2016-07-26 17:37:40,516 () volttron.platform.aip INFO: agent /home/dh/.volttron/agents/95bdebf2-390e-40b9-94e9-0cc75dc3099b/sqlhistorianagent-3.5.0 has PID 9883

2016-07-26 17:37:40,773 (sqlhistorianagent-3.5.0 9883) <stderr> ERROR: Generating LALR tables

2016-07-26 17:37:40,777 (sqlhistorianagent-3.5.0 9883) sqlhistorian.historian DEBUG: Historian using module: MySqlFuncts

2016-07-26 17:37:40,779 (sqlhistorianagent-3.5.0 9883) volttron.platform.agent.base_historian DEBUG: Constructor of BaseHistorian thread: MainThread

2016-07-26 17:37:40,780 (sqlhistorianagent-3.5.0 9883) volttron.platform.vip.agent.core DEBUG: IDENTITY FILE EXISTS FOR 95bdebf2-390e-40b9-94e9-0cc75dc3099b

2016-07-26 17:37:40,783 (sqlhistorianagent-3.5.0 9883) volttron.platform.agent.base_historian INFO: Topic string replace list: None

***2016-07-26 17:37:40,786 (sqlhistorianagent-3.5.0 9883) <stdout> INFO: No module named mysql.connector***

2016-07-26 17:37:40,786 (sqlhistorianagent-3.5.0 9883) sqlhistorian.db.basedb DEBUG: Constructing Driver for mysql.connector in thread: MainThread

2016-07-26 17:37:40,787 (sqlhistorianagent-3.5.0 9883) sqlhistorian.historian ERROR: unhandled exception

File "/home/dh/.volttron/agents/95bdebf2-390e-40b9-94e9-0cc75dc3099b/sqlhistorianagent-3.5.0/sqlhistorian/historian.py", line 299, in main

File "/home/dh/.volttron/agents/95bdebf2-390e-40b9-94e9-0cc75dc3099b/sqlhistorianagent-3.5.0/sqlhistorian/historian.py", line 288, in historian

File "/home/dh/.volttron/agents/95bdebf2-390e-40b9-94e9-0cc75dc3099b/sqlhistorianagent-3.5.0/sqlhistorian/historian.py", line 144, in __init__

File "/home/dh/.volttron/agents/95bdebf2-390e-40b9-94e9-0cc75dc3099b/sqlhistorianagent-3.5.0/sqlhistorian/db/mysqlfuncts.py", line 73, in __init__

File "/home/dh/.volttron/agents/95bdebf2-390e-40b9-94e9-0cc75dc3099b/sqlhistorianagent-3.5.0/sqlhistorian/db/basedb.py", line 23, in __init__

2016-07-26 17:37:40,808 (sqlhistorianagent-3.5.0 9883) volttron.platform.agent.base_historian DEBUG: Starting process loop.

2016-07-26 17:37:40,808 (sqlhistorianagent-3.5.0 9883) volttron.platform.agent.base_historian DEBUG: Setting up backup DB.

2016-07-26 17:37:40,810 (sqlhistorianagent-3.5.0 9883) sqlhistorian.historian DEBUG: historian_setup on Thread: Thread-2

2016-07-26 17:37:40,811 (sqlhistorianagent-3.5.0 9883) volttron.platform.agent.base_historian DEBUG: Getting oldest outstanding to publish.

2016-07-26 17:37:40,811 (sqlhistorianagent-3.5.0 9883) volttron.platform.agent.base_historian DEBUG: Reading from/waiting for queue.

2016-07-26 17:37:40,827 (sqlhistorianagent-3.5.0 9883) <stderr> ERROR: Exception in thread Thread-2 (most likely raised during interpreter shutdown):

2016-07-26 17:37:40,828 (sqlhistorianagent-3.5.0 9883) <stderr> ERROR: Traceback (most recent call last):

2016-07-26 17:37:40,828 (sqlhistorianagent-3.5.0 9883) <stderr> ERROR:   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner

2016-07-26 17:37:40,828 (sqlhistorianagent-3.5.0 9883) <stderr> ERROR:   File "/usr/lib/python2.7/threading.py", line 763, in run

2016-07-26 17:37:40,828 (sqlhistorianagent-3.5.0 9883) <stderr> ERROR:   File "/home/dh/volttron/volttron/platform/agent/base_historian.py", line 610, in _process_loop

2016-07-26 17:37:40,829 (sqlhistorianagent-3.5.0 9883) <stderr> ERROR:   File "/usr/lib/python2.7/Queue.py", line 174, in get

2016-07-26 17:37:40,829 (sqlhistorianagent-3.5.0 9883) <stderr> ERROR: <type 'exceptions.TypeError'>: 'NoneType' object is not callable

1 Answers1

0

In an activated shell install the connector.

pip install mysql-connector-python-rf

This is documented in the readme file of the SQLHistorian.

Craig
  • 949
  • 1
  • 5
  • 13
  • Thank you! I was able to pass that error message. I had another error message, which was due to missing the "meta table". It was not mentioned in the User Guide, but it is clearly notified at: https://github.com/VOLTTRON/volttron/blob/3.5-beta/services/core/SQLHistorian/mysql-create.sql – Da-Wei Huang Jul 27 '16 at 17:34