Hi everibody I need help I don’t know what happens with this import.
the folder is Users and I got acciones.py inside this. there is a class Acciones: but not working
from Users import acciones
from acciones import *
May fix the error. Dot is generally used in packages, not in basic modules.
I think so,
from Users.acciones import *
should work, the problem is with the .
before Users
maybe use the same way again,
from usuario import *
or,
from usuario import Usuario as model
in Users/acciones.py
maybe this would work,
from Users.usuario import Usuario as models
in Users/acciones.py
maybe need to specify path from the directory one is running the program, we run the program main.py
, therefore need to specify paths from the directory where main.py
is present.
if we were running the program Users/acciones.py
then would have to specify,
from usuario import Usuario as model
in Users/acciones.py
You can try appending acciones’ path to the system path.(not permanently)(i am not sure if it is recommended by others but works)
import sys
sys.path.append("./Users")
from acciones import *
[..YOUR CODE..]
thnks willl try
It work perfect Mrs Sandra Thnks too much