-1

MySQL-Historian 准备好使用了吗?我尝试了代理,但像以前一样收到错误消息。我首先想看看“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
4

1 回答 1

0

在激活的外壳中安装连接器。

pip install mysql-connector-python-rf

这记录在 SQLHistorian 的自述文件中。

于 2016-07-27T07:05:14.387 回答