title: How to deploy a .txt file to PythonAnywhere from a Python/Flask application
body: <p>I am trying to deploy a Python/Flask application to PythonAnywhere, but I am receiving a, <strong>&quot;Something went wrong&quot;</strong> error. After checking the error log, I found this message, <strong>&quot;FileNotFoundError: [Errno 2] No such file or directory: 'words.txt'&quot;</strong>. I have a word.txt file in my application which contains various different words (I am using it as a dictionary that my application reads from) and want to know how I can deploy a .txt file from PythonAnywhere? Every other file/folder that I upload seems to be accepted.</p>
  <p>Here is my code:</p>
  <p>Python</p>
  <pre><code>class Boggle():
  
      def __init__(self):
  
          self.words = self.read_dict(&quot;words.txt&quot;)
  
      def read_dict(self, dict_path):
          &quot;&quot;&quot;Read and return all words in dictionary.&quot;&quot;&quot;
  
          dict_file = open(dict_path)
          words = [w.strip() for w in dict_file]
          dict_file.close()
          return words
  
      def make_board(self):
          &quot;&quot;&quot;Make and return a random boggle board.&quot;&quot;&quot;
  
          board = []
  
          for y in range(5):
              row = [choice(string.ascii_uppercase) for i in range(5)]
              board.append(row)
  
          return board
  
      def check_valid_word(self, board, word):
          &quot;&quot;&quot;Check if a word is a valid word in the dictionary and/or the boggle board&quot;&quot;&quot;
  
          word_exists = word in self.words
          valid_word = self.find(board, word.upper())
  
          if word_exists and valid_word:
              result = &quot;ok&quot;
          elif word_exists and not valid_word:
              result = &quot;not-on-board&quot;
          else:
              result = &quot;not-word&quot;
  
          return result
  </code></pre>
  <p>Also here is a screenshot of my directory
  <a href="https://i.stack.imgur.com/HrCJS.png" rel="nofollow noreferrer">Photo of project directory</a></p>
  <p>As you can see, the, &quot;word.txt&quot; file is in the root of the directory.</p>