Hi,
I face this error message when running python with eikon api today. The error message is module 'anyio' has no attribute 'Lock'. I have already downgraded the anyio version from 3.4.0 to 3.2.1, but the problem stays. How to solve this problem?
Thanks.
Python 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.
IPython 7.22.0 -- An enhanced Interactive Python.
import sys
sys.path.append(r'C:\users\clli\python_prod\Lib\site-packages')
import holidays
from RAW_Daily_imports import dailyimport
from GlobeWatchlist import globe_returns
from CreateDailyPriceFile import dailypxfile
test=dailyimport(justdata=True)
Starting NAV import process
Starting FX import process
Master file script error
test=dailyimport(justdata=True,run_which=['Benchmark'])
Exception ignored in: <function Session.__del__ at 0x0000029390C70940>
Traceback (most recent call last):
File "C:\users\clli\python_prod\Lib\site-packages\eikon\streaming_session\session.py", line 237, in __del__
Session.unregister_session(self)
File "C:\users\clli\python_prod\Lib\site-packages\eikon\streaming_session\session.py", line 153, in unregister_session
raise EikonError('Error', 'Try to unregister unavailable session')
eikon.eikonError.EikonError: Error code Error | Try to unregister unavailable session
Master file script error
test=dailyimport(justdata=True,run_which=['Benchmark'])
Exception ignored in: <function Session.__del__ at 0x0000029390C70940>
Traceback (most recent call last):
File "C:\users\clli\python_prod\Lib\site-packages\eikon\streaming_session\session.py", line 237, in __del__
Session.unregister_session(self)
File "C:\users\clli\python_prod\Lib\site-packages\eikon\streaming_session\session.py", line 153, in unregister_session
raise EikonError('Error', 'Try to unregister unavailable session')
eikon.eikonError.EikonError: Error code Error | Try to unregister unavailable session
Master file script error
(1)
import eikon as ek # the Eikon Python wrapper package
import pandas as pd
ek.set_app_key('10e2f58ba50c4e58aa4ddde0c910e1f6a515c10e')
Exception ignored in: <function Session.__del__ at 0x0000029390C70940>
Traceback (most recent call last):
File "C:\users\clli\python_prod\Lib\site-packages\eikon\streaming_session\session.py", line 237, in __del__
Session.unregister_session(self)
File "C:\users\clli\python_prod\Lib\site-packages\eikon\streaming_session\session.py", line 153, in unregister_session
raise EikonError('Error', 'Try to unregister unavailable session')
eikon.eikonError.EikonError: Error code Error | Try to unregister unavailable session
Traceback (most recent call last):
File "<ipython-input-9-eae58f4994ba>", line 3, in <module>
ek.set_app_key('10e2f58ba50c4e58aa4ddde0c910e1f6a515c10e')
File "C:\users\clli\python_prod\Lib\site-packages\eikon\Profile.py", line 33, in set_app_key
get_profile().set_app_key(app_key)
File "C:\users\clli\python_prod\Lib\site-packages\eikon\Profile.py", line 223, in set_app_key
self._desktop_session = DesktopSession(app_key=app_key,
File "C:\users\clli\python_prod\Lib\site-packages\eikon\streaming_session\desktop_session.py", line 25, in __init__
super().__init__(app_key=app_key,
File "C:\users\clli\python_prod\Lib\site-packages\eikon\streaming_session\session.py", line 218, in __init__
self._http_session = httpx.AsyncClient(
File "C:\users\clli\python_prod\Lib\site-packages\httpx\_client.py", line 1380, in __init__
self._transport = self._init_transport(
File "C:\users\clli\python_prod\Lib\site-packages\httpx\_client.py", line 1428, in _init_transport
return AsyncHTTPTransport(
File "C:\users\clli\python_prod\Lib\site-packages\httpx\_transports\default.py", line 233, in __init__
self._pool = httpcore.AsyncConnectionPool(
File "C:\users\clli\python_prod\Lib\site-packages\httpcore\_async\connection_pool.py", line 111, in __init__
self._pool_lock = AsyncLock()
File "C:\users\clli\python_prod\Lib\site-packages\httpcore\_synchronization.py", line 12, in __init__
self._lock = anyio.Lock()
AttributeError: module 'anyio' has no attribute 'Lock'