title: How do I import my own object in vs studio code?
body: <p>I'm trying to import the <em>Human</em> object I created for my contact book program and im doing it in VS Studio Code but it gives me an error:</p>
  <pre><code>Import &quot;Human&quot; could not be resolved
  </code></pre>
  <p>I tried to make the program in pycharm instead and it imported just fine and I even finished the program. And while looking around for a solution for the VS Studio Code version, I found some stuff like adding</p>
  <pre><code>&quot;python.autoComplete.extraPaths&quot;: [&quot;./**&quot;],
  </code></pre>
  <p>to my settings.json and I did and a few other things i found on google, but it nothing helped.</p>
  <p>VS Studio Code:</p>
  <pre><code>from Human import Human
  #from Contact_Book_Project.Human import Human # auto generated, Not sure how it is different but i do have these 2 classes in a folder called Contact_Book_Project
  
  book = []
  
  def main():
      while (True):
  
          choice = int(input(&quot;Press 1 to add someone to your Contact Book\n2 to remove someone from the book\n3 to find someone\n4 to list everyone\n5 to exit\n&quot;))
  
          if (choice == 5):
              break
          elif (choice == 1):
              name = input(&quot;Name: &quot;)
              phoneNum = input(&quot;Phone Number: &quot;)
              address = input(&quot;Address: &quot;)
  
              person = Human(name, phoneNum, address)
  
              addPerson(person)
  
  def addPerson(person):
      book.append(person)
  
  if __name__ == &quot;__main__&quot;:
      main()
  </code></pre>
  <pre><code>class Human:
      def __init__(self, name, phone_Number, address):
          self.Name = name
          self.Phone_Number = phone_Number
          self.Address = address
  
      def getName(self):
          return self.Name
  
      def getPhoneNumber(self):
          return self.Phone_Number
  
      def getAddress(self):
          return self.Address
  </code></pre>
  <p>PyCharm Code:</p>
  <pre><code>from Human import Human
  
  book = []
  
  
  def main():
      while (True):
  
          try:
              choice = int(input(
                  &quot;Press 1 to add someone to your Contact Book\n2 to remove someone from the book\n3 to find someone\n4 to &quot;
                  &quot;list everyone\n5 to exit\n&quot;))
  
              if (choice == 5):
                  break
  
              elif (choice == 1):
                  name = input(&quot;Name: &quot;)
                  phoneNum = input(&quot;Phone Number: &quot;)
                  address = input(&quot;Address: &quot;)
  
                  person = Human(name, phoneNum, address)
  
                  addPerson(person)
  
              elif (choice == 2):
                  name = input(&quot;Enter name of person to remove: &quot;)
  
                  temp = 0
                  for i in book:
                      if i.getName() == name:
                          book.pop(temp)
                          print(i.getName() + &quot; removed.&quot;)
                          break
  
                      temp += 1
  
  #            elif (choice == 3):
  #                name = input(&quot;Enter name of person to check if they are in your contact book and retrieve their &quot;
  #                             &quot;information: &quot;)
  #
  #                if name in book:
  #                    temp = book.__getitem__(name)
  #                    print(
  #                        &quot;Name: &quot; + temp.getName() + &quot;\nPhone Number: &quot; + temp.getPhoneNumber() + &quot;\nAddress: &quot; + temp.getAddress())
  #                else:
  #                    print(name + &quot; does not exist in your contact book.&quot;)
  
              elif (choice == 4):
                  for p in book:
                      print(
                          &quot;Name: &quot; + p.getName() + &quot;\nPhone Number: &quot; + p.getPhoneNumber() + &quot;\nAddress: &quot; + p.getAddress() + &quot;\n&quot;)
  
          except ValueError:
              print(&quot;\nInvalid input.\n&quot;)
  
  def addPerson(person):
      book.append(person)
  
  if __name__ == '__main__':
      main()
  </code></pre>
  <p>both are using the same <em>Human</em> class. How can I fix this? Why is it throwing an error in VS Studio but work in Pycharm?</p>