Coder Social home page Coder Social logo

Comments (10)

Rafiot avatar Rafiot commented on July 18, 2024

Try with the very latest version of PyMISP, it is still compatible with python 3.9.

from pymisp.

Dystopie-github avatar Dystopie-github commented on July 18, 2024

WIth the latest version v2.4.188 or v2.4.190, I have a similar but different error:

Traceback (most recent call last): File "cf_misp_to_crowdstrike", line 231, in cfentry File "lib3/phantom/decided/playbook_resource_score.py/playbook_resource_score.py", line 123, in _wrapper File "cf_misp_to_crowdstrike", line 193, in cf_misp_to_crowdstrike File "cf_misp_to_crowdstrike", line 33, in GetMispAttributes File "/opt/phantom/usr/python39/lib/python3.9/site-packages/pymisp/api.py", line 189, in __init__ if brotli_supported(): File "/opt/phantom/usr/python39/lib/python3.9/site-packages/pymisp/api.py", line 129, in brotli_supported version_splitted = version('urllib3').split('.') # noqa: F811 AttributeError: 'NoneType' object has no attribute 'split'

from pymisp.

Rafiot avatar Rafiot commented on July 18, 2024

ok, so version('urllib3') returns None on your machine. It makes very little sense as urllib3 is a dependency of PyMISP and it is pulled on install.

I'm wondering if you're running the script as a different user from the one you installed PyMISP with? Or in a different environment?

from pymisp.

Dystopie-github avatar Dystopie-github commented on July 18, 2024

OK, it really strange because If I modify my code to add

print(urllib.request.__version__)

It does print version 3.9

from pymisp.

Rafiot avatar Rafiot commented on July 18, 2024

from the same terminal you installed PyMISP (without sudo), run in a python terminal:

from importlib.metadata import version
print(version('pymisp'))
print(version('urllib3'))

from pymisp.

Rafiot avatar Rafiot commented on July 18, 2024

Also, this is incorrect, you're checking the version of urllib not urllib3

from pymisp.

Dystopie-github avatar Dystopie-github commented on July 18, 2024

OK, it does return NONE.

print(version('pymisp'))
2.4.188
print(version('urllib3'))
None

Looking at the logs for pymisp installation. I do see

Requirement already satisfied: urllib3<3,>=1.21.1 in ./usr/python39/lib/python3.9/site-packages (from requests<3.0.0,>=2.31.0->pymisp==2.4.188) (2.2.1)

from pymisp.

Rafiot avatar Rafiot commented on July 18, 2024

Both of them return None? Somehow, they're not installed in the virtual environment you're in. My guess it that it has something to do with an installation done as root (sudo), or something permission related.

from pymisp.

Dystopie-github avatar Dystopie-github commented on July 18, 2024

I checked the permission. I can't find anything wrong. I'm using python on an application call. Splunk soar. I opened a ticket with them because urllib3 return none on all my server running that application.

from pymisp.

Rafiot avatar Rafiot commented on July 18, 2024

yeah, they can probably give you some hints, because you cannot have PyMISP installed without urllib3 normally.

from pymisp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.