Currently, I am encountering an error when using either rd, or ld while making data requests through the API gateway. The error is: "LDError: 'dict' object has no attribute 'url'". Please assist me with this issue.
rd
ld
"LDError: 'dict' object has no attribute 'url'"
@thanhct2005
Thank you for reaching out to us.
You may need to able the debug log in the library to verify what the problem is by using the following code.
config = ld.get_config() config.set_param("logs.transports.file.enabled", True) config.set_param("logs.transports.file.name", "lseg-data-lib.log") config.set_param("logs.level", "debug") ld.open_session(….)
The lseg-data-lib.log file will be created. We may be able to see the cause of the problem in the log file.
Yes, it seems the error continues.
I attached the log file.
Can you expand the Traceback… to see the code that causes this error?
Thank you for the information.
According to the Traceback, it may relate to the proxy settings on your machine.
File D:\news.venv\Lib\site-packages\httpx_transports\default.py:168, in HTTPTransport.init(self, verify, cert, trust_env, http1, http2, limits, proxy, uds, local_address, retries, socket_options) 155 if proxy is None: 156 self._pool = httpcore.ConnectionPool( 157 ssl_context=ssl_context, 158 max_connections=limits.max_connections, (...) 166 socket_options=socket_options, 167 )--> 168 elif proxy.url.scheme in ("http", "https"): 169 self._pool = httpcore.HTTPProxy( 170 proxy_url=httpcore.URL( 171 scheme=proxy.url.raw_scheme, (...) 185 socket_options=socket_options, 186 ) 187 elif proxy.url.scheme in ("socks5", "socks5h"): AttributeError: 'dict' object has no attribute 'url'
It looks like it was unable to access the url property from the proxy object.
You can check you proxy settings and run the following command.
from httpx._utils import get_environment_proxies get_environment_proxies()