BERT-Dialog-State-Tracking
BERT-Dialog-State-Tracking copied to clipboard
AttributeError: 'NoneType' object has no attribute 'to'
Traceback (most recent call last):
File "E:\Project\DST\BERT-Dialog-State-Tracking-master21\main.py", line 120, in
@larunxn Hi, probably you are using Windows not Linux. I had the same problem and solved it. The problem is in file_utils.py file, in get_from_cache function. This line "urllib.request.urlretrieve(url, temp_file.name)" internally tries to open the temp file, which is already opened, so that causes an error on windows. I solved this by closing the tmp file before the function call "temp_file.close()" the open it again after it "temp_file = open(temp_file.name, 'w')". It worked. But at the end, downloaded model is a tar file, so I will try to run code now in an ubuntu docker container to avoid the headache of trying to made code windows compatible.