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

problem about cached_path #4

Open
nuistlyk opened this issue Jul 18, 2022 · 0 comments
Open

problem about cached_path #4

nuistlyk opened this issue Jul 18, 2022 · 0 comments

Comments

@nuistlyk
Copy link
Collaborator

here is the traceback

Traceback (most recent call last):
  File "spam_hunter.py", line 75, in <module>
    spamhunter =SpamHunter(start_time.strftime('%Y-%m-%dT%HZ'), end_time.strftime('%Y-%m-%dT%HZ'))
  File "spam_hunter.py", line 21, in __init__
    self.tweetDetector: TweetDetector = TweetDetector()
  File "/home/ykli/spamhunter/SpamHunter-main/detect_tweet_text.py", line 15, in __init__
    self.predictor = Predictor.from_path(self.model_path, predictor_name = "sentence_classifier")
  File "/home/ykli/sh/lib/python3.8/site-packages/allennlp/predictors/predictor.py", line 366, in from_path
    load_archive(archive_path, cuda_device=cuda_device, overrides=overrides),
  File "/home/ykli/sh/lib/python3.8/site-packages/allennlp/models/archival.py", line 206, in load_archive
    resolved_archive_file = cached_path(archive_file)
  File "/home/ykli/sh/lib/python3.8/site-packages/allennlp/common/file_utils.py", line 135, in cached_path
    _cached_path.file_friendly_logging(common_logging.FILE_FRIENDLY_LOGGING)
AttributeError: module 'cached_path' has no attribute 'file_friendly_logging'

I've solved this problem by set the version of cached_path to 1.1.2

pip install --upgrade cached_path==1.1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant