Comments (6)
if anyone can help
@ChuckWoodraska @jmeridth @timothycrosley
from python_api.
@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.
from python_api.
Line where I get error in mywork.py
riskscore = json.loads(str(self.domaintools_client.risk(url)))
domaintools_client is
import domaintools
import requests
class DomainToolsClient:
def __init__(self, api_name, api_key, proxy=None):
self.api_name = api_name
self.api_key = api_key
self.proxy = None
self.api = domaintools.API(self.api_name, self.api_key)
if proxy:
self.proxy = {"https_proxy": proxy}
self.api = domaintools.API(self.api_name, self.api_key, proxy_url=proxy, verify_ssl=False)
def investigate(self, domain):
params = {"api_username": self.api_name,
"api_key": self.api_key}
res = requests.get(f"https://api.domaintools.com/v1/iris-investigate/{domain}", params=params,
proxies=self.proxy)
return res.json()
def risk(self, domain):
return self.api.risk(domain)
from python_api.
This issue was caused because of improper proxy settings.
Generally we set proxies as dictionary, but here we need to set it as string,
Ex. Generally
proxy = {'http': 'something', 'https': 'something'}
In this case
proxy = 'something'
It too so long to identify its a proxy issue due to improper error handling in package. Difficult to find out from following error.
AttributeError: 'dict' object has no attribute 'decode'
'dict' object has no attribute 'decode'
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.
from python_api.
@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.
from python_api.
Thank you for the comment @patilnikhilh80, per @ChuckWoodraska's comment above, we've tried to improve our messaging for issues such as this.
from python_api.
Related Issues (20)
- _rate_limit breaks when api returns None as the hour/minute rate limit. HOT 1
- [IRIS INVESTIGATE] Limit the number of results
- Async not Python 3.7 compatible HOT 1
- Unawaited coroutine HOT 1
- reverse_whois limit on results? HOT 1
- async calls can block on sync calls made via requests HOT 1
- aiohttp==3.4.4 dependency issue on Ubuntu 16.04.5 HOT 2
- 403 NotAuthorizedException in code when Account Information endpoint disabled HOT 2
- Python 3.7 ImportError: cannot import name 'API' from 'domaintools' (unknown location) HOT 2
- Test Issue
- exceptions.ServiceException: Unknown Exception HOT 1
- No Error Handling of Limit Exceeded In Iris Investigate Queries
- No Documentation for Search Hash in Iris Investigate HOT 1
- parsed WHOIS flattened() exception when flattening IP address record
- 414 Request-URI Too Large exception when requesting a list of domains with long names HOT 1
- Error message HOT 3
- Retrieve Shared Iris Queries via API HOT 6
- Pagination improvements HOT 3
- Bug: Limit Check for XML HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python_api.