Comments (6)
I've seen it before, It happens when the apps.ready()
is not called. I remember restarting the server refreshing the browser and the error was gone... I was not able to reproduce it again.
Can you reproduce it? what python and django versions are you running?
from spirit.
I am running Django 1.7.7 and python 3.4 (in a virtualenv).
I am trying to reproduce it but il looks like it doesn't happen when using the development server. I was using nginx+gunicorn when the TypeError showed up.
EDIT: My bad, I was using the pip version on my local server. Will retry with the git version.
from spirit.
If you are able to reproduce it, let me know.
I'm almost sure what the problem is... it's a race condition in the djconfig
library. It can only happen in the first request (second actually) after you start the server, while the first request is populating the config cache, the second request will try to use it and it'll return None (when accessing the config.topics_per_page
in this case).
from spirit.
I was able to reproduce it:
Create a fresh virtualenv (python 3), git clone the latest master branch of spirit, install all the requirements via pip install -r, follow the installation instructions described in the README.md
manage.py migrate
manage.py createcachetable spirit_cache
manage.py collectstatic
launch a gunicorn server
gunicorn project.wsgi
Using an administrator account, navigate through the admin panel and create some categories. The TypeError sometimes happen when returning to the forum index. Restarting gunicorn is indeed a temporary solution.
(Sorry if that is not clear enough, this is my first real bug report)
from spirit.
It has to be that race condition... I can't seem to reproduce this 😅
Can you run pip install django-djconfig --upgrade
and let me know if it keeps happening?
You may have to run python manage.py migrate djconfig --fake-initial
afterwards or just remove your database and migrate everything again.
If this happens again it should throw an AttributeError
this time.
from spirit.
I found what's causing this: https://docs.djangoproject.com/en/1.7/ref/settings/#timeout
The cache keys will expire after five minutes! 😂
Thank you! I will release a fix ASAP.
from spirit.
Related Issues (20)
- Method to add fields to Topic or Comment HOT 5
- URL preview HOT 3
- cannot change password when forget HOT 7
- Search function not work HOT 17
- Some tests misusing assertTrue for comparisons
- Security concern HOT 3
- Upgrade Django to the latest 3.2.14 security patch if you can; otherwise this is not usable anymore. HOT 3
- Upgrade to django 4 HOT 1
- spirit-project.com broken HOT 2
- How to make the site available only for logged in users? HOT 1
- Server error when USE_TZ = False HOT 7
- What is the easiest way to put multiple fields on a form on the same line? HOT 1
- Improve settings validations
- Have setting SPIRIT_AUTH_USER_MODEL (defaults to the AUTH_USER_MODEL) but can be overridden HOT 5
- Search always says: There are no search results. HOT 4
- Does every topic have to be subscribed to in order to get notified? HOT 1
- How do I embed a youtube video in a post? HOT 1
- Is it possible to include iframe element in a comment?
- Can you explain the "flags" feature? HOT 1
- Would it be better to index Comment rather than Topic? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spirit.