mandiant / mandiant/stringsifter

[rank_strings 2.20201202 error]: AttributeError: module 'numpy' has no attribute 'typeDict'

Open
#37 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
763
Forks
126
PR merge metrics
No merged PRs in 30d

Description

Rank_strings version 2.20201202
Also with version 3.20230711
Traceback given when I try to run rank_strings (with or without arguments):

Traceback (most recent call last):
File "/usr/local/bin/rank_strings", line 8, in
sys.exit(argmain())
File "/usr/local/lib/python3.8/dist-packages/stringsifter/rank_strings.py", line 140, in argmain
main(args.input_strings, args.limit, args.min_score,
File "/usr/local/lib/python3.8/dist-packages/stringsifter/rank_strings.py", line 28, in main
featurizer = joblib.load(os.path.join(modeldir, "featurizer.pkl"))
File "/usr/local/lib/python3.8/dist-packages/joblib/numpy_pickle.py", line 585, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/usr/local/lib/python3.8/dist-packages/joblib/numpy_pickle.py", line 504, in _unpickle
obj = unpickler.load()
File "/usr/lib/python3.8/pickle.py", line 1212, in load
dispatch[key[0]](self)
File "/usr/lib/python3.8/pickle.py", line 1537, in load_stack_global
self.append(self.find_class(module, name))
File "/usr/lib/python3.8/pickle.py", line 1579, in find_class
__import__(module, level=0)
File "/usr/local/lib/python3.8/dist-packages/sklearn/__init__.py", line 80, in
from .base import clone
File "/usr/local/lib/python3.8/dist-packages/sklearn/base.py", line 21, in
from .utils import _IS_32BIT
File "/usr/local/lib/python3.8/dist-packages/sklearn/utils/__init__.py", line 20, in
from scipy.sparse import issparse
File "/usr/lib/python3/dist-packages/scipy/sparse/__init__.py", line 229, in
from .base import *
File "/usr/lib/python3/dist-packages/scipy/sparse/base.py", line 8, in
from .sputils import (isdense, isscalarlike, isintlike,
File "/usr/lib/python3/dist-packages/scipy/sparse/sputils.py", line 16, in
supported_dtypes = [np.typeDict[x] for x in supported_dtypes]
File "/usr/lib/python3/dist-packages/scipy/sparse/sputils.py", line 16, in
supported_dtypes = [np.typeDict[x] for x in supported_dtypes]
File "/usr/local/lib/python3.8/dist-packages/numpy/__init__.py", line 320, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'typeDict'

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read stringsifter/rank_strings.py at line 28 and inspect the dependency versions implicated by scipy/sparse/sputils.py and numpy/__init__.py. Run rank_strings with and without arguments to confirm the failure; done means it starts without the numpy.typeDict AttributeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python, scikit-learn
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.