Flask import problem (Unable to import 'controllers' pylint(import-error)

Asked

Viewed 37 times

-1

Good evening, I’m starting to program now and I’m trying to make a simple system using the Flask framework, but during the organization of the files I came across the problem of the title, I’m not able to import the default located in the controllers folder, where I am missing?organização do sistema e onde o erro de import está aparecendo

1 answer

0

Basically the problem is because you are not using '.' There are two possible options to solve your problem.

  1. Import a single file:
from .controller import default
  1. Import all modules from directory
from . import controller

Browser other questions tagged

You are not signed in. Login or sign up in order to post.