question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix fetching config from ORM

See original GitHub issue

@josephmancuso how do you plan to fetch database config ? Right now it is :

from config.database import DATABASES

Should we replace it by something like:

from masonite.helpers import config
DATABASES = config("database.databases")

I got some issue with latest version when running masonite-orm command:

  ModuleNotFoundError
  No module named 'config'
  at ~/.virtualenvs/masonite_pingcrm/lib/python3.8/site-packages/masoniteorm/connections/ConnectionFactory.py:48 in make
      44│ 
      45│         Returns:
      46│             masonite.orm.connection.BaseConnection -- Returns an instance of a BaseConnection class.
      47│         """
    → 48│         from config.database import DATABASES
      49│ 
      50│         if key == "default":
      51│             connection_details = DATABASES.get(DATABASES.get("default"))
      52│             connection = self._connections.get(connection_details.get("driver"))

I know a lot of a refactoring is in progress and I don’t if the “masonite config integration” has not been done yet or if it’s a bug. Thanks 👍

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
josephmancusocommented, Sep 30, 2020

we may have to lazy load masonite so it doesn’t conflict with people who don’t have Masonite installed

0reactions
girardinsamuelcommented, Sep 30, 2020

I will do that in a PR

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Config server - cant fetch properties - Stack Overflow
I am having trouble fetching the properties form a spring config server with another spring application. I can fetch it with the browser...
Read more >
Spring-cloud-config-server not fetching properties file from git ...
The config-server that i have written is not fetching properties files form github when using spring-boot-version 2.0.1.
Read more >
Spring Cloud - Bootstrapping - Baeldung
This article shows how to bootstrap spring cloud application by employing four common microservices, the config, the discovery, ...
Read more >
2. Spring Cloud Config Server
As Spring Cloud Config Server has a clone of the remote git repository after check-outing branch to local repo (e.g fetching properties by...
Read more >
ORM Configuration - SQLAlchemy 1.4 Documentation
I'm getting a warning or error about “Implicitly combining column X under ... The SQLAlchemy ORM, in order to map to a particular...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found