0
votes

When using this code

with open('/dbfs/FileStore/tables/jenks_tweets.txt', 'w') as f:
   for item in final_tweets:
     f.write('%s\n' % item)

I get this error:

FileNotFoundError: [Errno 2] No such file or directory: '/dbfs/FileStore/tables/jenks_tweets.txt'

FileNotFoundError Traceback (most recent call last) in 16 17 ---> 18 with open('/dbfs/FileStore/tables/jenks_tweets.txt', 'w') as f: 19 for item in final_tweets: 20 f.write('%s\n' % item)

FileNotFoundError: [Errno 2] No such file or directory: '/dbfs/FileStore/tables/jenks_tweets.txt'

1

1 Answers

0
votes

It turns out the slashes were facing in the wrong direction

with open('\dbfs\FileStore\tables\jenks_tweets.txt', 'w') as f:
   for item in final_tweets:
     f.write('%s\n' % item)