Thanks for your post, the code and error messages are helpful! With what you've provided here, I can reproduce this on Cloud too. What operating system are you using locally? I think you might be running into some aspect of this:
Have a look at that there and see if it helps (there are a couple of suggestions in there). If I change your second chunk to this: