Closed klyuhang9 closed 3 years ago
Hi @klyuhang9 ,
Thanks for your question. I just tried this code, and it works fine for me.
Looking at the error message, the getaddrinfo failed
message probably shows that there was a DNS error. The homl.info
domain name was not resolved correctly. This may be due to a temporary DNS issue, so you could retry now. If the problem persists, it might be due to a firewall or VPN issue, or some other network issue.
You could also try replacing the URL with this:
shakespeare_url = "https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt"
If that still does not work, then try downloading the file manually (in your web browser) and save it to $HOME/.keras/datasets/shakespeare.txt
where $HOME
is the path to your home directory (e.g., /Users/your_user_name).
Hope this helps!
Hi, I bought your book, then I excitedly tried to complete the task of generating Shakespearean in the book, but I found that. When I ran this code:
the program would report an error. The error alert is as follows:
File "C:\python\lib\site-packages\tensorflow\python\keras\utils\data_utils.py", line 282, in get_file raise Exception(error_msg.format(origin, e.errno, e.reason)) Exception: URL fetch failure on https://homl.info/shakespeare: None -- [Errno 11004] getaddrinfo failed
I could not fine how to fix this. Hope your hope.