-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while accessing from Linux env #78
Comments
if anyone can help |
@patilnikhilh80 Can you please provide the code snippet you're using that works on windows but fails on Linux? My first thought is a path issue. But your snippet will help confirm my suspicion. Please note that I don't work for DomainTools anymore but willing to help. |
Line where I get error in mywork.py
|
This issue was caused because of improper proxy settings. It too so long to identify its a proxy issue due to improper error handling in package. Difficult to find out from following error.
maybe we can improve the error msg to understand it more easily. Like invalid proxy or something. Can I open PR, seems don't have access though. |
@patilnikhilh80 nice catch. You can fork the repository and issue a pull request from there. You won't have access to create a branch on this repo directly. |
Thank you for the comment @patilnikhilh80, per @ChuckWoodraska's comment above, we've tried to improve our messaging for issues such as this. |
Issue:
I have a python application which uses domain_tools api. My dev environment is on my windows PC and it work fine but when I deploy it to linux server it give following error
Traceback (most recent call last):
File "/home/myuser/myapplication/lib/work/work.py", line 98, in run
execute_func(msg)
File "/home/myuser/myapplication/lib/work/fraud/mywork.py", line 49, in execute
riskscore = json.loads(str(self.domaintools_client.risk(url)))
File "/home/myuser/myapplication/mylibrary/myclient/domaintools_client.py", line 24, in risk
return self.api.risk(domain)
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/domaintools/api.py", line 254, in risk
return self._results('risk', '/v1/risk', items_path=('components',), domain=domain, cls=Reputation,
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/domaintools/api.py", line 66, in _results
self._rate_limit()
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/domaintools/api.py", line 60, in _rate_limit
for product in self.account_information():
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/domaintools/base_results.py", line 197, in iter
return self._items().iter()
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/domaintools/base_results.py", line 180, in _items
response = self.response()
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/domaintools/base_results.py", line 161, in response
response = self.data()
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/domaintools/base_results.py", line 92, in data
results = self._get_results()
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/domaintools/base_results.py", line 74, in _get_results
data = self._make_request()
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/domaintools/base_results.py", line 68, in _make_request
return session.get(url=self.url, params=self.kwargs, verify=self.api.verify_ssl,
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/requests/sessions.py", line 555, in get
return self.request('GET', url, **kwargs)
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/requests/sessions.py", line 542, in request
resp = self.send(prep, **send_kwargs)
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/requests/sessions.py", line 636, in send
kwargs.setdefault('proxies', self.rebuild_proxies(request, self.proxies))
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/requests/sessions.py", line 305, in rebuild_proxies
username, password = get_auth_from_url(new_proxies[scheme])
File "/home/myuser/myapplication/venv/lib64/python3.8/site-packages/requests/utils.py", line 948, in get_auth_from_url
parsed = urlparse(url)
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/urllib/parse.py", line 372, in urlparse
url, scheme, _coerce_result = _coerce_args(url, scheme)
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/urllib/parse.py", line 124, in _coerce_args
return _decode_args(args) + (_encode_result,)
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/urllib/parse.py", line 108, in _decode_args
return tuple(x.decode(encoding, errors) if x else '' for x in args)
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/urllib/parse.py", line 108, in
return tuple(x.decode(encoding, errors) if x else '' for x in args)
AttributeError: 'dict' object has no attribute 'decode'
'dict' object has no attribute 'decode'
For same input the Windows gives correct o/p while Linux gives error.
If anyone has any suggestions, it will be a great help
The text was updated successfully, but these errors were encountered: