DialoGPT
DialoGPT copied to clipboard
dbm.error: need 'c' or 'n' flag to open new db
Got an error below when trying to run demo.py:
Traceback (most recent call last):
File "LSP_train.py", line 176, in
The error message indicate that the db file you make can not be loaded. Can you send us more information? Are you running the demo.py via anaconda environment or docker?
Got the same problem.
We have fixed the issue. Thanks for the feedback!
Hi,
Thanks for your repo.
I have got the same problem here.
Andrea
Hi,
Thanks for your repo.
I have got the same problem here.
Andrea
Hi Andrea,
Thanks for your interests. Can you help us double check if you are using our latest commit? If yes could you provide more information, like
- Your OS
- which environment are you using
- The file names and their size under data folder (by using ls -lh under linux)?
Thanks again for your interests.
Best,
Siqi
I'm having this issue running dialoGPT "demo.py" script in docker environment on UBUNTU 16.04. I created a tsv file, then replaced the "train.tsv" reference in demo.py with my new tsv file name. I'm using demo.py because it seemed simpler than digging through LSP_train.py trying to work out all the arguments myself. I don't really know what im doing..
full error:
Traceback (most recent call last):
File "LSP_train.py", line 177, in <module>
args.max_seq_length)
File "/workspace/data_loader.py", line 114, in __init__
self.db = shelve.open(f'{db_name}/db', 'r')
File "/opt/conda/envs/pytorch-py3.6/lib/python3.6/shelve.py", line 243, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/opt/conda/envs/pytorch-py3.6/lib/python3.6/shelve.py", line 227, in __init__
Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback)
File "/opt/conda/envs/pytorch-py3.6/lib/python3.6/dbm/__init__.py", line 85, in open
raise error[0]("need 'c' or 'n' flag to open new db")
dbm.error: need 'c' or 'n' flag to open new db
Exception ignored in: <bound method BucketingDataLoader.__del__ of <data_loader.BucketingDataLoader object at 0x7fcf336421d0>>
Traceback (most recent call last):
File "/workspace/data_loader.py", line 151, in __del__
self.db.close()
AttributeError: 'BucketingDataLoader' object has no attribute 'db'
05/27/2020 08:34:29 - INFO - __main__ - Done!
I'm having this issue running dialoGPT "demo.py" script in docker environment on UBUNTU 16.04. I created a tsv file, then replaced the "train.tsv" reference in demo.py with my new tsv file name. I'm using demo.py because it seemed simpler than digging through LSP_train.py trying to work out all the arguments myself. I don't really know what im doing..
full error:
Traceback (most recent call last): File "LSP_train.py", line 177, in <module> args.max_seq_length) File "/workspace/data_loader.py", line 114, in __init__ self.db = shelve.open(f'{db_name}/db', 'r') File "/opt/conda/envs/pytorch-py3.6/lib/python3.6/shelve.py", line 243, in open return DbfilenameShelf(filename, flag, protocol, writeback) File "/opt/conda/envs/pytorch-py3.6/lib/python3.6/shelve.py", line 227, in __init__ Shelf.__init__(self, dbm.open(filename, flag), protocol, writeback) File "/opt/conda/envs/pytorch-py3.6/lib/python3.6/dbm/__init__.py", line 85, in open raise error[0]("need 'c' or 'n' flag to open new db") dbm.error: need 'c' or 'n' flag to open new db Exception ignored in: <bound method BucketingDataLoader.__del__ of <data_loader.BucketingDataLoader object at 0x7fcf336421d0>> Traceback (most recent call last): File "/workspace/data_loader.py", line 151, in __del__ self.db.close() AttributeError: 'BucketingDataLoader' object has no attribute 'db' 05/27/2020 08:34:29 - INFO - __main__ - Done!
I have same problem with DialoGPT. I tempted to run demo.py in docker environment on Ubuntu 20.04. The error is completely same with yours. If you solve the problem now, could you share your experiences? THKS!