title: global name 'json' is not defined
body: <p>Here is the beginning of createPeliMelo.py</p>
  
  <pre><code>def creation(path,session):
  
      myPathFile=path+session+'.txt'
      print myPathFile
      pelimeloFile = open(path+session+'.txt', 'r')
  
      with pelimeloFile as inf:    
          data = json.loads(inf.read())
  </code></pre>
  
  <p>Here is my Python script inside Maya:</p>
  
  <pre><code>import maya.cmds as cmds
  import json
  import os
  from itertools import islice
  import createPeliMelo as PeliMelo
  
  PeliMelo.creation('C:/Users/francesco/Desktop/pelimelo video printemps/','session5723')
  </code></pre>
  
  <p>Here is the error I got:</p>
  
  <blockquote>
    <p>Error: line 1: NameError: file C:/Users/francesco/Documents/maya/2016/scripts\createPeliMelo.py line
    17: global name 'json' is not defined #</p>
  </blockquote>
  
  <p>Line 17 is: <code>data = json.loads(inf.read())</code></p>
  
  <p>Where am I wrong?</p>