OpenCTI-Platform / connectors

OpenCTI Connectors
https://www.opencti.io
Apache License 2.0
382 stars 416 forks source link

import-file-stix connector Error: unable to import required numpy module. #846

Open symsal opened 2 years ago

symsal commented 2 years ago

Description

Error: unable to import required numpy module.

See https://pypi.python.org/pypi/numpy.Listing Threat-Actors with filters null.

OpenCTI API is not reachable. Waiting for OpenCTI API to start or check your configuration...

Result in looping task

Environment

  1. OS (where OpenCTI server runs): { docker }
  2. OpenCTI version: { 5.3.13}
  3. OpenCTI client: { frontend }
  4. Other environment details:

Screenshots (optional)

symsal commented 2 years ago

numpy.distutils is deprecated since NumPy 1.23.0, as a result of the deprecation of distutils itself. It will be removed for Python >= 3.12. For older Python versions it will remain present. It is recommended to use setuptools < 60.0 for those Python versions. For more details, see: https://numpy.org/devdocs/reference/distutils_status_migration.html

SamuelHassine commented 2 years ago

Hello @symsal,

Can you please share the logs of the connector. Numpy is not an OpenCTI dependency.

Kind regards, Samuel

symsal commented 2 years ago

_opencti_connector-import-file-stix_1_logs.txt

This is the error that came up

symsal commented 2 years ago

How can I kill al this tasks?

SamuelHassine commented 2 years ago

Yes, it just seems your connector has no access to your platform. numpy is not used anywhere in our source code. Are you sure you are using the latest version of the connector?

symsal commented 2 years ago

I used the 5.3.13 version. I used docker stack and It has always worked until 5.3.12 -> 5.3.13

SamuelHassine commented 2 years ago

Hello @symsal,

Just delete the file. It was a bug in previous versions of the platform that looping tasks.

Kind regards, Samuel

ckane commented 1 year ago

FYI, this should be fixed in PR #1022 - the offending module was the maec Python module, which started including numpy in one part of it