Giter Site home page Giter Site logo

Comments (3)

amcgregor avatar amcgregor commented on August 27, 2024

It does not appear that Werkzeug's reloader is compatible with marrow.mongo. Specifically, Marrow Mongo populates two "virtual namespace packages" (marrow.mongo.field, marrow.mongo.document) which are not actually real on-disk packages (no __init__.py for them). Because they are not backed by on-disk files, those virtual modules do not have a __file__ attribute, which Werkzeug can't handle.

from mongo.

j-solis avatar j-solis commented on August 27, 2024

This is happening in the latest django for me

from mongo.

amcgregor avatar amcgregor commented on August 27, 2024

Closing as insufficient information is provided to reproduce.

LookupError: Unknown plugin "__file__"…

This is not an attribute access that occurs under my installation, and the Python version in question is now quite old. Feel free to re-open if reproducible under Python 3.8 or newer and without "live reloading" enabled.

  File "/home/user/.virtualenvs/myapp/lib/python3.5/site-packages/werkzeug/_reloader.py", line 263, in run_with_reloader
    reloader.run()
  File "/home/user/.virtualenvs/myapp/lib/python3.5/site-packages/werkzeug/_reloader.py", line 144, in run
    self.extra_files):
  File "/home/user/.virtualenvs/myapp/lib/python3.5/site-packages/werkzeug/_reloader.py", line 22, in _iter_module_files
    filename = getattr(module, '__file__', None)

This segment of traceback clearly implicates the "live reloading" functionality. Python, as a language, does not have this as a feature. I always recommend use of an external file monitoring and process management tool, such as entr. (I use this for all of my "watch files and do" needs, such as SCSS recompilation, development web service restarting, browser tab reloading, &c.)

from mongo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.