Skip to content

Cannot import from custom module in different directory #245

Description

@dewball345

Hello There,

This is my directory structure:

module1
---__init__.pyj
---test.pyj
file1
---__init__.pyj
---main.pyj

in test.pyj

def hello():
   print("Hello")

and in my main.pyj

from module1.test import hello

However, when I compile my python, I get this error message:

[ImportError: Failed Import: 'module1' module doesn't exist in any of the import directories: ., C:\Users\*username*\rapydscript_ryact\RapydScript\src\lib] {
  filename: ←[32m'main.pyj'←[39m,
  readfile_error: ←[90mundefined←[39m
}

Why is this happening? And how can i fix it?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions