title: No such file or directory: 'file.json' Error in Choregraphe 2.8
body: <p>I am trying to access a json file in Choregraphe 2.8 but it is not recognising where it is. I am using NAO6 virtual robot and have imported an external python script to this platform which works fine except reading and opening the json file.</p>
  <p>I have this part included in my imported python script:</p>
  <p><strong>read_json.py</strong></p>
  <pre><code>class JsonData():
      def open_json(self):
        with open('file.json', encoding = 'utf-8', mode='r') as json_file:
          self.json_data = json.load(json_file)
        return self.json_data
  
     def get_param(self, parameter):
       # open json file to access data
       self.open_json()
       
       # get the key values from json file
       if parameter == &quot;test&quot;:
         name = self.json_data[&quot;Name&quot;]
           return name
     
  </code></pre>
  <p>I used this <a href="https://www.youtube.com/watch?v=orDWxHQxw5s&amp;ab_channel=aboutrobots" rel="nofollow noreferrer">video</a> to guide me with importing external python script:</p>
  <p><strong>attachment_file.py</strong></p>
  <pre><code>    #other parts of the code are not included...
      def onLoad(self):
          self.framemanager = ALProxy(&quot;ALFrameManager&quot;)
  
      def onInput_onStart(self):
          self.folderName = self.framemanager.getBehaviorPath(self.behaviorId) + self.getParameter(&quot;File name&quot;)
  
          if (self.folderName) not in sys.path:
              sys.path.insert(0, self.folderName)
          self.onStopped()
  
      def onUnload(self):
          if (self.folderName) in sys.path:
              sys.path.remove(self.folderName)
  </code></pre>
  <p>I have another python script that is written in a box using Choregraphe tools. when I try to import the <strong>read_json.py</strong> to read the json file I get this error:</p>
  <pre><code>...\choregraphe\...\data\PackageManager\apps\.lastUploadedChoregrapheBehavior\behavior_1/..\read_json.py&quot;, line 9, in open_json with open('file.json', encoding = 'utf-8', mode='r') as json_file: IOError: [Errno 2] No such file or directory: 'file.json'  
  </code></pre>
  <p>For the onInput_onStart(self) section of the file I am using to import read_json.py is written like this:</p>
  <pre><code> def onInput_onStart(self):
          import read_json        
          self.a = read_json.JsonData()
          json_data = self.a.show_param(&quot;test&quot;)   #string output
          self.tts.say(json_data)
  </code></pre>
  <p>I have searched so much on how to import other files from Choregraphe 2.8 but everything else I tried to access a json file, other than the method above, was giving me the same error.</p>
  <p>I would really appreciate if anyone can help me with this.</p>
  <p>Many thanks in advance.</p>