Good evening, how can I import the testt.py file into typess.py please? For information, I tried with an __init__.py file in the main folder and use from .. import testt but I have a nasty import error: attempted relative import with no known parents package I tried with sys and os but it's worse.
-# I can speak in French too xd
thank you in advance for your solutions
#π import file
8 messages Β· Page 1 of 1 (latest)
@dapper knoll
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
I will try again to be sure that it didn't work because I have already used __init.py`` and sys` 
You can't import a file from a directory above the main file without modifying sys.path
import sys
sys.path.insert(0, "..")
import testt
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.