show_attend_and_tell_pytorch icon indicating copy to clipboard operation
show_attend_and_tell_pytorch copied to clipboard

Can't get attribute 'Vocabulary'

Open L0ittle opened this issue 5 years ago • 3 comments

when I train this like 'python main.py' it will return with the error as the following:

Traceback (most recent call last): File "main.py", line 298, in main(args) File "main.py", line 57, in main vocab = pickle.load(f) AttributeError: Can't get attribute 'Vocabulary' on <module 'main' from 'main.py'>

I have found nothing to resolve it

L0ittle avatar Jul 08 '19 10:07 L0ittle

To quickly fix this bug, you could add this line at the top of main.py

from prepro import *

Or you could reformat the code, such as putting the code related to the vocab to a new file vocab.py.

ghrua avatar Jul 09 '19 13:07 ghrua

Thanks a lot for your reply, it have got resolved.

L0ittle avatar Jul 09 '19 14:07 L0ittle

@L0ittle, hello, how did you solved it? can you tell me what do you do? thanks !

y78h11b09 avatar Mar 22 '20 09:03 y78h11b09