omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    ModuleNotFound Error

    Pythonista
    external module external files
    2
    3
    204
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Wences
      Wences last edited by ccc

      Trying to learn Python using Pythonista whilst commuting to work by following a course that uses another software to code on Python.

      One of the exercises creates a class in a different file, and by using the from file.py import Class instruction on a different file, I get the ModuleNotFound Error message.

      Both files are saved in the same “folder” within Pythonista so I did not expect to include a path to the file that contains the class.

      Do I need to use another software to enable the use of external classes / modules, do they have to be in a specific folder for Pythonista to know where the source is, or am I missing something else?

      Any help would be appreciated.

      cvp 1 Reply Last reply Reply Quote 0
      • cvp
        cvp @Wences last edited by cvp

        @Wences try "from file import ..." without specifying .py and be sure your "Class" is correctly written (uppercase or not)

        1 Reply Last reply Reply Quote 0
        • Wences
          Wences last edited by

          Thanks, took the .py extension and worked!

          Thanks for your help!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Powered by NodeBB Forums | Contributors