1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 <2018> 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: PyEPICS timeout in jupyter |
From: | "Shen, Guobao" <[email protected]> |
To: | Matt Newville <[email protected]> |
Cc: | Talk EPICS Tech <[email protected]> |
Date: | Wed, 16 May 2018 17:30:08 +0000 |
Eventually, the root cause was identified. I have to set the PYEPICS_LIBCA to point to the specific one that pvapy uses.
After that, everything works fine.
Thanks, Guobao From: Shen, Guobao
Sent: Wednesday, May 16, 2018 11:48:12 AM To: Matt Newville Cc: Talk EPICS Tech Subject: Re: PyEPICS timeout in jupyter Hi Matt, I eventually found my problem. In my code, I imported pvaccess, which is EPICS7 python client. Once I commented out that line, the problem disappeared.
Thanks for all your helps. Guobao From: [email protected] <[email protected]> on behalf of Matt Newville <[email protected]>
Sent: Tuesday, May 15, 2018 4:10:10 PM To: Shen, Guobao Cc: Talk EPICS Tech Subject: Re: PyEPICS timeout in jupyter Hi Guobao,
On Tue, May 15, 2018 at 11:36 AM, Shen, Guobao
<[email protected]> wrote:
Sorry, that should have just been
print("Connected ", chan, conn) If the channel really is connected, I think you should be able to get the value, and I don't understand what is wrong.
If the channel really is not connected, then the error makes more sense, and probably suggests EPICS_CA_ADDR_LIST is not set. And, depending on how you start the Jupyter Notebook, that setting of an environment variable like EPICS_CA_ADDR_LIST may change. For me, using Anaconda Python3 on MacOS, starting the Jupyter notebook by typing "~/anaconda3/bin/jupyter- But if you launch Jupyter (or IPython or jupyterlab) from Anaconda Navigator, the shell environmental variables defined in '.bash_profile' (and similar places) will not be used.
In particular, you may have to set EPICS_CA_ADDR_LIST *before* doing any real CA work:
In[1]: import os, epics In[2]: os.environ['EPICS_CA_ADDR_ In[3]: epics.caget('XXX:m1.VAL') Out[3]: -0.25 Hope that helps, --Matt
|