tango-controls/PyTangoArchiving

Errors with PyTangoArchiving in virtualenv

Opened this issue · 6 comments

ArchivingBrowser, archiving_service and snaps scripts fail when called from virtualenv

Start/Stop doesn't work from Reader object

Full description at:

http://www.tango-controls.org/community/forum/c/development/python/hdbtdb-archiving-with-pytangoarchiving/

i succeed in my virtualenv,

until version 7.5.1 :
scripts (archiving_service and ArchivingBrowser) and objects (Reader, ArchivingAPI and SnapAPI) worked well
except snaps script missing ui file

version 8.3.1 :
scripts (archiving_service) and objects (Reader, ArchivingAPI and SnapAPI) worked well
except snaps script missing ui file
except ArchivingBrowser script fail getSchema(tdb): failed!
getSchema(hdb): failed!

version 8.5.1 :
all objects (Reader, ArchivingAPI and SnapAPI) fail
and always ArchivingBrowser script fail getSchema(tdb): failed!
getSchema(hdb): failed!

I'll come back soon with what i did for well working 7.5.1 :)

Hi JMC,

I just pushed some changes fixing that and .ui missing file

I also updated pipy so you can try it on virtualenv

Have a nice weekend,

Sergi

sorry Sergi,

version 8.5.1 i installed before seems ok except ArchivingBrowser script.
i will try again next we...

Nice also,
JCM

Hi Sergi,

following is what i did for well running in my virtualenv (venv) :)

pip install PyTangoArchiving
pip install taurus

taurus for virtualenv

ln -s /usr/lib/python2.7/dist-packages/PyQt4 ./venv/lib/python2.7/site-packages/
ln -s /usr/lib/python2.7/dist-packages/sip.x86_64-linux-gnu.so ./venv/lib/python2.7/site-packages/
pip install QtPy

all the archivers must be controled by astor.

set the environment variable:

export HOST=$TANGO_HOST

not used until now:
installed and configured HdbExtractor and TdbExtractor with property (DbConfig)
installed and configured ArchivingManager with properties (hdbuser, hdbpassword, tdbuser, tdbpassword)

for snap:
configured SnapArchiver with properties (DbUser, DbPassword)

pip list


fandango 13.9.0
MySQL-python 1.2.5
numpy 1.15.2
pytango 9.2.4
PyTangoArchiving 8.5.1
QtPy 1.5.1
taurus 4.4.0


so version 8.5.1 i installed is ok except ArchivingBrowser script.
I am going to try your updated pipy.

Hope help you,
JCM

i updated 8.5.2 from pipy in my virtualenv and have always the problem with ArchivingBrowser script.

following error:

2018-09-26 11:29:18: ArchivingBrowser()
****************************** USE_SCROLL=True ******************************
2018-09-26 11:29:18:In AttributesPanel()
<taurus.qt.qtcore.util.emitter.SingletonWorker instance at 0x7ff90fa135a8>.next()
2018-09-26 11:29:18:Out of generateTable()
getSchema(tdb): failed!
getSchema(hdb): failed!
Multiprocess:False

following pop-up when asking to view only the archived attributes:

pop-up Warning
"No matching attribute hasbeen found in Tango DB (try Archiving option)."

FYI

readerHdb=PyTangoArchiving.Reader('*')
getSchema(tdb): failed!
getSchema(hdb): failed!

FYI no error using Reader and ArchivingAPI objects like this:

readerHdb=PyTangoArchiving.Reader(db='hdb',config='user:password@hostname')

apiHdb=PyTangoArchiving.ArchivingAPI('hdb','hostname','user','password')

Hope help you,
JCM