-
Notifications
You must be signed in to change notification settings - Fork 101
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
config.cfg is missing from model #28
Comments
This happened to me too on my new machine, it's got to do with the new SpaCy version (>3.0.0). For me installing an older version (2.3) solved the problem and I can use Blackstone. /edited for typos |
@thibault- I installed spacy 2.3.0 but I am still running into issues. |
@varsha1288 you need version 2.1.8, anything 2.2.0 and above falls over. |
But still getting the same error. ============================== Info about spaCy ============================== spaCy version 2.1.8 OSError Traceback (most recent call last) /anaconda3/lib/python3.7/site-packages/spacy/init.py in load(name, vocab, disable, exclude, config) /anaconda3/lib/python3.7/site-packages/spacy/util.py in load_model(name, vocab, disable, exclude, config) /anaconda3/lib/python3.7/site-packages/spacy/util.py in load_model_from_package(name, vocab, disable, exclude, config) /anaconda3/lib/python3.7/site-packages/en_blackstone_proto/init.py in load(**overrides) /anaconda3/lib/python3.7/site-packages/spacy/util.py in load_model_from_init_py(init_file, vocab, disable, exclude, config) /anaconda3/lib/python3.7/site-packages/spacy/util.py in load_model_from_path(model_path, meta, vocab, disable, exclude, config) /anaconda3/lib/python3.7/site-packages/spacy/util.py in load_config(path, overrides, interpolate) OSError: [E053] Could not read config.cfg from /anaconda3/lib/python3.7/site-packages/en_blackstone_proto/en_blackstone_proto-0.0.1/config.cfg |
Think you need to use python 3.6.12 as well.
On Sun, 30 May 2021 at 14:20, Shubham Kumar Nigam ***@***.***> wrote:
But still getting the same error.
============================== Info about spaCy
==============================
spaCy version 2.1.8
Location /anaconda3/lib/python3.7/site-packages/spacy
Platform Darwin-18.5.0-x86_64-i386-64bit
Python version 3.7.7
Models
------------------------------
OSError Traceback (most recent call last)
in
----> 1 nlp = spacy.load("en_blackstone_proto")
/anaconda3/lib/python3.7/site-packages/spacy/*init*.py in load(name,
vocab, disable, exclude, config)
/anaconda3/lib/python3.7/site-packages/spacy/util.py in load_model(name,
vocab, disable, exclude, config)
322 return default
323
--> 324
325 def read_regex(path):
326 path = ensure_path(path)
/anaconda3/lib/python3.7/site-packages/spacy/util.py in
load_model_from_package(name, vocab, disable, exclude, config)
355 entries (tuple): The suffix rules, e.g.
spacy.lang.punctuation.TOKENIZER_SUFFIXES.
356 RETURNS (regex object): The regex object. to be used for
Tokenizer.suffix_search.
--> 357 """
358 expression = "|".join([piece + "$" for piece in entries if
piece.strip()])
359 return re.compile(expression)
/anaconda3/lib/python3.7/site-packages/en_blackstone_proto/*init*.py in
load(**overrides)
10
11 def load(**overrides):
---> 12 return load_model_from_init_py(*file*, **overrides)
/anaconda3/lib/python3.7/site-packages/spacy/util.py in
load_model_from_init_py(init_file, vocab, disable, exclude, config)
520
521
--> 522 def minibatch_by_words(items, size, tuples=True, count_words=len):
523 """Create minibatches of a given number of words."""
524 if isinstance(size, int):
/anaconda3/lib/python3.7/site-packages/spacy/util.py in
load_model_from_path(model_path, meta, vocab, disable, exclude, config)
388 return lookup[string]
389 return default_func(string)
--> 390
391
392 def update_exc(base_exceptions, *addition_dicts):
/anaconda3/lib/python3.7/site-packages/spacy/util.py in load_config(path,
overrides, interpolate)
545 else:
546 batch.append(doc)
--> 547 if batch:
548 yield batch
549
OSError: [E053] Could not read config.cfg from
/anaconda3/lib/python3.7/site-packages/en_blackstone_proto/en_blackstone_proto-0.0.1/config.cfg
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#28 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAVGJBOVOLKAA6NQDCID7LTQI3QFANCNFSM4ZKT3QHQ>
.
--
Regards,
Ryan McDonough
|
For those who had the error: o Step 1: create new env (conda create -n myenv)/ then activate (conda activate myenv) |
Error while loading the model : Could not read config.cfg
Stacktrace:
OSError Traceback (most recent call last)
in
1 # Load the model
----> 2 nlp = en_blackstone_proto.load()
env\lib\site-packages\en_blackstone_proto_init_.py in load(**overrides)
10
11 def load(**overrides):
---> 12 return load_model_from_init_py(file, **overrides)
env\lib\site-packages\spacy\util.py in load_model_from_init_py(init_file, vocab, disable, exclude, config)
512 if not model_path.exists():
513 raise IOError(Errors.E052.format(path=data_path))
--> 514 return load_model_from_path(
515 data_path,
516 vocab=vocab,
env\lib\site-packages\spacy\util.py in load_model_from_path(model_path, meta, vocab, disable, exclude, config)
386 meta = get_model_meta(model_path)
387 config_path = model_path / "config.cfg"
--> 388 config = load_config(config_path, overrides=dict_to_dot(config))
389 nlp = load_model_from_config(config, vocab=vocab, disable=disable, exclude=exclude)
390 return nlp.from_disk(model_path, exclude=exclude)
env\lib\site-packages\spacy\util.py in load_config(path, overrides, interpolate)
543 else:
544 if not config_path or not config_path.exists() or not config_path.is_file():
--> 545 raise IOError(Errors.E053.format(path=config_path, name="config.cfg"))
546 return config.from_disk(
547 config_path, overrides=overrides, interpolate=interpolate
OSError: [E053] Could not read config.cfg from env\lib\site-packages\en_blackstone_proto\en_blackstone_proto-0.0.1\config.cfg
The text was updated successfully, but these errors were encountered: