You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings, Lambeq team.
I was able to use BobCatParser until yesterday, when I started getting this problem every time I tried to execute this line of code !!!
-------------------------------------- The error ----------------------------------------------------------------------------
2 frames /usr/local/lib/python3.9/dist-packages/lambeq/text2diagram/bobcat_parser.py in init(self, model_name_or_path, root_cats, device, cache_dir, force_download, verbose, **kwargs)
265 raise ValueError('Invalid model name or path: '
266 f'{model_name_or_path!r}')
--> 267 download_model(model_name_or_path, model_dir, verbose)
268
269 with open(model_dir / 'pipeline_config.json') as f:
/usr/local/lib/python3.9/dist-packages/lambeq/text2diagram/bobcat_parser.py in download_model(model_name, model_dir, verbose)
144 if verbose != VerbosityLevel.SUPPRESS.value:
145 print('Extracting model...')
--> 146 tar = tarfile.open(fileobj=model_file)
147 tar.extractall(model_dir)
148 model_file.close()
/usr/lib/python3.9/tarfile.py in open(cls, name, mode, fileobj, bufsize, **kwargs)
1623 fileobj.seek(saved_pos)
1624 continue
-> 1625 raise ReadError("file could not be opened successfully")
1626
1627 elif ":" in mode:
ReadError: file could not be opened successfully
The text was updated successfully, but these errors were encountered:
Greetings, Lambeq team.
I was able to use BobCatParser until yesterday, when I started getting this problem every time I tried to execute this line of code !!!
What should I do to correct this error?
---------------------------------------------------------------My code ---------------------------------------------------------------------------
1 from lambeq import BobcatParser
2
----> 3 parser = BobcatParser(verbose='text')
4
5 raw_train_diagrams = parser.sentences2diagrams(train_data, suppress_exceptions=True)
-------------------------------------- The error ----------------------------------------------------------------------------
2 frames
/usr/local/lib/python3.9/dist-packages/lambeq/text2diagram/bobcat_parser.py in init(self, model_name_or_path, root_cats, device, cache_dir, force_download, verbose, **kwargs)
265 raise ValueError('Invalid model name or path: '
266 f'{model_name_or_path!r}')
--> 267 download_model(model_name_or_path, model_dir, verbose)
268
269 with open(model_dir / 'pipeline_config.json') as f:
/usr/local/lib/python3.9/dist-packages/lambeq/text2diagram/bobcat_parser.py in download_model(model_name, model_dir, verbose)
144 if verbose != VerbosityLevel.SUPPRESS.value:
145 print('Extracting model...')
--> 146 tar = tarfile.open(fileobj=model_file)
147 tar.extractall(model_dir)
148 model_file.close()
/usr/lib/python3.9/tarfile.py in open(cls, name, mode, fileobj, bufsize, **kwargs)
1623 fileobj.seek(saved_pos)
1624 continue
-> 1625 raise ReadError("file could not be opened successfully")
1626
1627 elif ":" in mode:
ReadError: file could not be opened successfully
The text was updated successfully, but these errors were encountered: