Hi,
when I try to use Sardana 2.1.0 with Taurus 4.0.1 running ascan from macrogui I get the following error:
Error details: Traceback (most recent call last): File "/home/jkotan/testsar/lib/python2.7/site-packages/sardana/macroserver/msmacromanager.py", line 1192, in __runXMLMacro macro_obj, _ = self._prepareXMLMacro(xml) File "/home/jkotan/testsar/lib/python2.7/site-packages/sardana/macroserver/msmacromanager.py", line 936, in _prepareXMLMacro prepare_result = self._prepareMacroObj(macro_obj, macro_params) File "/home/jkotan/testsar/lib/python2.7/site-packages/sardana/macroserver/msmacromanager.py", line 959, in _prepareMacroObj prepare_opts=prepare_opts) File "/home/jkotan/testsar/lib/python2.7/site-packages/sardana/macroserver/msmacromanager.py", line 756, in prepareMacroObj return macro.prepare(*par_list, **prepare_opts) File "/usr/lib/python2.7/dist-packages/sardana/macroserver/macros/scan.py", line 338, in prepare self._prepare([motor], [start_pos], [final_pos], nr_interv, integ_time, **opts) File "/usr/lib/python2.7/dist-packages/sardana/macroserver/macros/scan.py", line 125, in _prepare self._gScan = SScan(self, self._stepGenerator, moveables, env, constrains, extrainfodesc) File "/home/jkotan/testsar/lib/python2.7/site-packages/sardana/macroserver/scan/gscan.py", line 326, in __init__ self._setupEnvironment(env) File "/home/jkotan/testsar/lib/python2.7/site-packages/sardana/macroserver/scan/gscan.py", line 574, in _setupEnvironment channels_info = self.measurement_group.getChannelsEnabledInfo() File "/home/jkotan/testsar/lib/python2.7/site-packages/sardana/taurus/core/tango/sardana/pool.py", line 1493, in getChannelsEnabledInfo return self.getConfiguration().getChannelsInfoList(only_enabled=True) File "/home/jkotan/testsar/lib/python2.7/site-packages/sardana/taurus/core/tango/sardana/pool.py", line 1290, in getChannelsInfoList channels_info = self.getChannelsInfo(only_enabled=only_enabled) File "/home/jkotan/testsar/lib/python2.7/site-packages/sardana/taurus/core/tango/sardana/pool.py", line 1276, in getChannelsInfo for ch_name, (_, _, ch_info) in ret.items(): ValueError: too many values to unpack Job ended (stopped=False, aborted=False)
while when I try to run spock I get
jkotan@haso228k:~/sources/sardana$ spock MainThread INFO 2016-09-14 08:27:03,965 TaurusRootLogger: Using "PyQt4" for Qt Spock needs itango version >= 0.1.4. No itango installation found
Do I miss something?
Bests,
Jan
Spock requires itango >= 0.1.4 from version 2.1.0 on.
You can obtain it from PyPI.
We will get back to you with the first problem soon.
Jan, could you please post here the steps to reproduce the first problem?
We have just tried it here, and were unable to trigger the error.
Please be specific with the measurement group since from the traceback it seems to be related to it.
Hi Zibi,
Thanks. Indeed, installing itango solves the second problem.
And the first problem is related to measurement group configuration, i.e. with tango channels. If I remove it everything is OK. Bellow I attach the configuration read in jive.
Does it mean that configuration is not backward compatible or it is just a bug? What should be a proper JSON substring for tango channels?
Bests,
Jan
No, there were no backwards incompatibilities introduced in this release. So it must be a bug. Let us check it carefully and we will reply to you soon.
The patch was sent to the develop mainling list. Jan could you please test if it fix the problem that you had.
If you confirm we will make a hotfix release that includes [#507] and [#508].
Related
OLD Tickets:
#507OLD Tickets:
#508Hi Zibi,
Thanks. Yes, it fixes th problem.
Cheers,
Jan
Hi,
it seems that
itango
interferes with PyTango 8, i.e. it createsitango
which already exists in pytango.Does it me mean that the current sardana i.e. 2.1 can be used only with PyTango 9 ?
Best regards,
Jan
The idea was to keep Sardana compatible with PyTango < 9.
For the Sardana needs itango introduced a backwards compatibility layer with the PyTango <9 (it imports stuff from PyTango.ipython when needed) - see here.
What kind of problems do you have?
Hi Zibi,
The problem is the when you install
itango-0.1.5
viasetup.py
it creates theitango
script inbin
directory. A similaritango
script in the same location is provided bypytango 8
(python-pytango-8.1.7
on debian). So if we want to install both one overwrites another.At DESY we cannot create packages without modifiying
setup.py
ofitango
, i.e. removing the script creation part.Otherwise debian packages would be not compatible.
I know that it is more a bug in
itango
, i.e. cannot work with pytango < 8 but since sardana start to useitango
it is also the problem of sardana.Cheers,
Jan
The same issue was raised by Frederic in this PR, but we finally ignored it. But of course we could rethink it in order to improve the current behavior (actually we should invite the PyTango people to this discussion...).
Personally I see the problem a little bit tricky cause it stays on the border of different "packaging" systems.
I have done two different types of installations:
Test 1
/usr/bin
.python setup.py install
- it installs itango script in/usr/local/bin
.Due to the default path precedence the newer script will be used.
Test 2
pip install --egg
) orpython setup.py install
- it installs itango script in/usr/bin/local
.python setup.py install
- it also installs/usr/local/bin
.There is no problem since pip does not protect against overriding files and the second package installs the newer version of the script. I think that installing in the reversed order will be also ok since the itango package has PyTango as one of the install_requires hence the old script will get overridden. Anyone knows if the itango > 0.1.4 will work with the old script?
Maybe for your internal packaging you could have an option of not including the script in the itango package?
Last edit: Zbigniew Reszela 2016-09-20
I see that this issue already moved to itango...
Hi Zibi,
ad. Test 1: for debian setup.py installs python scripts into /usr/bin as well.
ad. Test 2: But if you install in reverse order and both packages are already installed (i.e. you reinstall packages) the the last will left. If you do it automatically you may event not notice which version is on the top.
For internal packaging you can do the tricks by using some options or modify sources but for me it would be better to do it in the sources. If not It should be explicitly explain installation procedure of sardana 2.1 for pytango 8 e.g. in README.rst, i.e. that itango overrides pytango 8 and therefore one has to install itango without scripts. The current situation is really misleading.
Bests,
Jan
Regarding the Test1. I have performed the test on debian8 docker container and it installs in
/usr/local/bin
. I attach the logs. Maybe the destination depends on some other software or configuration?Regarding the Test2. The part of installing in the reversed order was just my assumption. I really don't know how would it behave in this particular case - I don't know pip enough.
And finally regarding the docs, I totally agree with you. If finally the itango will stay as it is (and from the above mentioned issue I see some inclination into it) we should add a note about the risk of overriding scripts when installing itango dependency. We don't have README.rst file but I think that puting it here is also ok. What do you think? There is already an issue about updating this docs [#426]. I hopefully will have enough time to do it before we release the hotfix 2.1.1...
Related
OLD Tickets:
#426Hi Zibi,
I've talked about it with Vincent at
https://github.com/tango-cs/itango/issues/8
One solution is to slit itango into seperate branches (one for itango for PyTango 8) and (another for itango for PyTango 9) with a different version numbers.
Do you see in this solutions any problems from the point of view of sardana?
Bests,
Jan
No, I think it is ok for us. More details in this post
Integrated with hotfix 2.1.1 release.