Python Forum
Can't import any class from other folder in the same level.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't import any class from other folder in the same level.
#1
Hi! i'm having several issues trying to import a library from other folder that is in the same level of the current file.

[Image: d761a38380.png]

I tried to use "..tests.libs.selenium_driver", "..libs.selenium_driver" and several more, but no one is working.

Im using VS Code. It might be something in the configuration? I'm not using virtual enviroment or something like that.

This is my python configuration.
        {
            "name": "Python",
            "type": "python",
            "request": "launch",
            "stopOnEntry": false,
            "pythonPath": "${config:python.pythonPath}",
            "program": "${file}",
            "cwd": "${workspaceFolder}",
            "env": {},
            "envFile": "${workspaceFolder}/.env",
            "debugOptions": [
                "RedirectOutput"
            ]
        },
Thank you very much.
Reply


Messages In This Thread
Can't import any class from other folder in the same level. - by emih89 - Feb-08-2018, 01:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  cant access root environment folder from django folder using __init__.py Sanjish 0 1,949 Dec-25-2020, 05:56 AM
Last Post: Sanjish
  How do I use shortcut to import class in VS code? cheers100 0 1,642 Nov-28-2020, 08:11 AM
Last Post: cheers100

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020