Pelican: `Exception: File /tag/index.html is to be overwritten` just after installed

Created on 20 Nov 2013  ยท  7Comments  ยท  Source: getpelican/pelican

I use Archlinux.
And create a virtualenv for install and use pelican.

(soulblog)[soulchainer@hinata] [soulbits] $ (~*3*)~ python --version
Python 3.3.2

And follow the docs to install it, with:

pip install pelican
pip install markdown

Configured it following the docs and get this configuration: https://gist.github.com/3b34a1651b9901d4205d
Added four plugins from pelican-plugins (but this happens also deactivating the plugins) and installed a theme from pelican-themes (same thing).
The actual hierarchy of my test site is (I won't use the automation tools, just pelican command):

soulbits/
โ”œโ”€โ”€ content
โ”‚   โ””โ”€โ”€ extra
โ”‚   โ””โ”€โ”€ images
โ”‚   โ””โ”€โ”€ pages
โ”‚   โ””โ”€โ”€ posts
โ”‚       โ””โ”€โ”€ 2013
โ”‚           โ””โ”€โ”€ 20
โ”‚               โ””โ”€โ”€ test.md 
โ”œโ”€โ”€ output
โ””โ”€โ”€ pelicanconf.py 

And when I try to build the site with pelican -D I get an
Exception: File /home/soulchainer/Dev/Proyectos/Web/soulbits/output/tag/index.html is to be overwritten error. What I'm doing wrong.
I revised the files and the docs many times and I don't know what to do.
Is this a configuration error? Is a bug? Can someone help me, please?
I don't know if this is the appropiate place to ask this. If not, told me about the appropiate site, sorry.

(Debug output: https://gist.github.com/soulchainer/c7e50f148c5dc4fb74d1/raw/32f86b390833e351e0d88aa165dcd9fdc9b4b4c7/tag_overwritten)

Most helpful comment

I ran into this same error and was able to reproduce it in a clean installation. It appears to be a conflict with paginated URLs and tags. In particular, the sample PAGINATION_PATTERNS in the settings docs appears to be broken.

Reproduction steps:

$ pelican --version
3.6.0

$ pelican-quickstart
...
Done. Your new project is available at /tmp/demo

$ echo "
PAGINATION_PATTERNS = (
    (1, '{base_name}/', '{base_name}/index.html'),
    (2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),
)" >>  pelicanconf.py

$ cat > content/demo.md <<EOF
Title: Demo
Date: 2015-7-17
Tags: one, two

Text
EOF

$ pelican
CRITICAL: RuntimeError: File /tmp/demo/output/tag/index.html is to be overwritten

All 7 comments

That error was added by @Rogdham and is designed to let you know that files are being overwritten, which is probably not what you want to happen.

I can only guess at why that might be happening with your settings, plugins, and various other changes. That said, any time you change a [*]_URL setting, it's probably wise to ensure you have a corresponding [*]_SAVE_AS setting that matches the structure you are trying to achieve.

In this case, you appear to have a number of custom URL patterns (e.g., TAG_URL) defined without specifying where you want the files to be saved (e.g., TAG_SAVE_AS). Rectifying that is probably a good place to start.

Hi Juan. Were you able to resolve the issue you submitted here?

Sorry, @justinmayer. I saw your first response, tried it and think "I will respond later". And later: I forgot.
No, it didn't resolve the issue. That wasn't the problem.
That exception keep raising.
I even tried with python2.7, just in case it was a version thing (I used py3), but same result.
In fact, I was so frustrated that I all the pelican installation.
I'm very sorry. Thanks for your support.
Maybe I will try again a fresh install next weekend.

I think using the pelican-quickstart command to generate a new project is a good place to start. Then you can begin modifying settings/templates/etc, one little bit at a time, so that way you know once you've done something that causes unexpected results. If you'd like further guidance, please join us on IRC > Freenode > #pelican โ€” we would be happy to help!

Hi. I know this is closed, @justinmayer , but I only want to tell you that now I'm happily using Pelican without any problem รฑ__รฑ
Thanks again ;)

I ran into this same error and was able to reproduce it in a clean installation. It appears to be a conflict with paginated URLs and tags. In particular, the sample PAGINATION_PATTERNS in the settings docs appears to be broken.

Reproduction steps:

$ pelican --version
3.6.0

$ pelican-quickstart
...
Done. Your new project is available at /tmp/demo

$ echo "
PAGINATION_PATTERNS = (
    (1, '{base_name}/', '{base_name}/index.html'),
    (2, '{base_name}/page/{number}/', '{base_name}/page/{number}/index.html'),
)" >>  pelicanconf.py

$ cat > content/demo.md <<EOF
Title: Demo
Date: 2015-7-17
Tags: one, two

Text
EOF

$ pelican
CRITICAL: RuntimeError: File /tmp/demo/output/tag/index.html is to be overwritten

@dimo414 #1615

Was this page helpful?
0 / 5 - 0 ratings

Related issues

networkpadawan picture networkpadawan  ยท  3Comments

chenjiandongx picture chenjiandongx  ยท  3Comments

nurupo picture nurupo  ยท  5Comments

therealmaxmoon picture therealmaxmoon  ยท  8Comments

mandaris picture mandaris  ยท  4Comments