Comments (17)
@brunlid can you provide a bit more information about your Flask application? Do you have any caching in place?
from flask-sitemap.
Hi,
It's still such a small site so we don't use any caching.
from flask-sitemap.
@brunlid do you get the error when you run your Flask app directly python manage.py runserver
(Flask-Script) or python app.py
(in case your app is similar to http://flask.pocoo.org/docs/0.10/quickstart/#a-minimal-application)? Can you also verify that url_for('yourendpoint', _external=True)
generates correct url?
from flask-sitemap.
I get it when running python app.py (as in the mini app example). Will chech url_for on the server shortly. Generates correct url when running locally.
from flask-sitemap.
@brunlid can you provide running code snippet that is generating the error?
from flask-sitemap.
Are you referring to my views? In that case:
@app.route('/')
@app.route('/index', methods=['GET', 'POST'])
def index():
return render_template('index.html',
title='Foxberry')
@ext.register_generator
def index():
yield 'index', {}
from flask-sitemap.
@brunlid it should be correct. Can you try to debug the output of list(ext._generate_all_urls())
?
Alternatively you can also try to set SITEMAP_INCLUDE_RULES_WITHOUT_PARAMS
to True
for url rules without view arguments.
from flask-sitemap.
Running locally all looks correct:
list(ext._generate_all_urls()) generates correct, i.e. localhost/index
SITEMAP_INCLUDE_RULES_WITHOUT_PARAMS = True also generates correct site map locally
problem is when running on server localhost remains. Is there a global setting like SITEMAP_BASE_URL that could be used to override?
Thx again
from flask-sitemap.
@brunlid have you managed to solve this issue? Can you please provide snippets of your server configuration?
I'm closing it for now as can't reproduce. Feel free to re-open with additional details. Thanks
from flask-sitemap.
I'm having the same issue.
from flask-sitemap.
@kennethreitz can you please give me more details?
- Python version
pip freeze
output- Minimal code that can trigger the error.
I would like to help, but I can't reproduce it.
from flask-sitemap.
Did you enable caching?
from flask-sitemap.
Can you reproduce the error with #36?
from flask-sitemap.
I also have this issue.
I'm running nginx + uwsgi to server the flask app.
All URLs are localhost. This is a fully functional, large web application with a lot of different flask extensions. Never had any problem like this.
from flask-sitemap.
@mbtronics can you check if you still have the issue when you apply #36?
from flask-sitemap.
Hopefully it has been fixed in #36. Please re-open if you are still having the issue. Please paste the output of pip freeze
.
from flask-sitemap.
Related Issues (20)
- StopIteration exception HOT 3
- pip install HOT 2
- cli: static sitemap generation HOT 5
- tests: python setup.py test not working HOT 2
- UnicodeDecodeError getting gziped sitemap HOT 1
- Is there a way to exclude a url? HOT 1
- sitemap: support `sitemapindex`
- AssertionError: Popped wrong request context on requesting sitemap from sitemapindex HOT 4
- Use current request context if it exists
- sitemap: configurable decorators for endpoints
- Problem when using non-default block_start_string, et. al. settings on Jinja HOT 2
- global: migration to github-actions from travis
- CI: Fix failing steps
- Not an Issue help needed HOT 2
- Change base url HOT 1
- Not working on python 3.10
- Make a new release of flask-sitemap
- 'datetime.date' object has no attribute 'update'
- docs: example of building and caching pages
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 flask-sitemap.