Skip to content
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

Broken DnsResponse - Not available for import #11

Open
jbabbin opened this issue Jun 15, 2016 · 5 comments
Open

Broken DnsResponse - Not available for import #11

jbabbin opened this issue Jun 15, 2016 · 5 comments
Labels

Comments

@jbabbin
Copy link

jbabbin commented Jun 15, 2016

Trying to use passivetotal library in a CRITS instance. However the service keeps reporting that the 'DnsResponse' function isn't available.

'
WARNING 2016-06-15 12:39:38,306 crits.services.core Failed to import service (passivetotal_service): cannot import name DnsResponse
`

`
------------------ Trying to manually import following docs found here

Python 2.7.11 (default, Dec 14 2015, 22:56:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from passivetotal.libs.dns import DnsRequest
from passivetotal.libs.dns import DnsResponse
Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name DnsResponse

`

I've tried both with 'pip' and manual installs as well as using the provided 'pt-config' to set my options

------------- Setting by hand

xxx@crits:/opt/git_passivetotal_python# pt-config setup [email protected] ee7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Current Configuration:

api_key : ee7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
api_server : api.passivetotal.org
api_version : v2
http_proxy :
https_proxy :
username : [email protected]
xxx@crits:/opt/git_passivetotal_python#
xxx@crits:/opt/git_passivetotal_python# pt-config show

Current Configuration:

api_key : ee7xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
api_server : api.passivetotal.org
api_version : v2
http_proxy :
https_proxy :
username : [email protected]

@9b 9b added the bug label Jun 15, 2016
@9b
Copy link
Collaborator

9b commented Jun 15, 2016

Will fix this. Please use https://github.com/passivetotal/python_api/releases/tag/v1.0.23 for now which works with CRITs. You can install it by running "pip install 'passivetotal==1.0.23'" (note the single quotes).

@jbabbin
Copy link
Author

jbabbin commented Jun 15, 2016

Thank for the quick response the version 1.0.23 works

Successfully installed dicttoxml-1.6.6 passivetotal-1.0.23 tabulate-0.7.5
xxx@crits:/opt/git_pyew# python
Python 2.7.11 (default, Dec 14 2015, 22:56:59)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

from passivetotal.libs.dns import DnsRequest
from passivetotal.libs.dns import DnsResponse
exit

@vesche
Copy link

vesche commented Jan 15, 2019

Bump, this issue persists in Python 2 & 3.

@aeetos
Copy link
Collaborator

aeetos commented Oct 21, 2021

@vesche Is this still an issue? If so, please comment and let us know how we can repro it so we can prioritize accordingly.

@vesche
Copy link

vesche commented Oct 24, 2021

@aeetos This is from a little while back, so I don't remember the details of the use case I was doing.

However, this seems fixed in Python 3 having just installed the latest package & attempted these imports:

❯ pip3 install passivetotal --user
...

❯ python3
Python 3.9.7 (default, Oct 13 2021, 06:45:31)
[Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from passivetotal.libs.dns import DnsRequest
>>> from passivetotal.libs.dns import DnsResponse
>>> # 👍

It seems this package no longer supports Python 2 so the problem is moot on that end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants