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

BobCatParser didn't get downloaded!! #74

Closed
yousrabou opened this issue Apr 4, 2023 · 2 comments
Closed

BobCatParser didn't get downloaded!! #74

yousrabou opened this issue Apr 4, 2023 · 2 comments

Comments

@yousrabou
Copy link

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

@nikhilkhatri
Copy link
Collaborator

Hi @yousrabou ,
This bug is fixed in the latest release (0.3.0). Could you try updating your lambeq installation and see if that fixes the issue?

@yousrabou
Copy link
Author

the issue is fixed , thank you @nikhilkhatri

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

2 participants