Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when starting prosopopee #98

Open
toasti2000 opened this issue Nov 4, 2019 · 18 comments
Open

Errors when starting prosopopee #98

toasti2000 opened this issue Nov 4, 2019 · 18 comments

Comments

@toasti2000
Copy link

Hello,
I just installed all packages and prosopopee as written in the documentation, but got this error messages when executing "prosopopee" or "prosopopee test":

(ve) toasti@toasti-LXM:~/Pictures/Prosopopee/pics$ prosopopee 
warning: If you want the rss and/or the social network share to work, you need to specify the website url in root settings
Traceback (most recent call last):
  File "/home/toasti/Pictures/Prosopopee/ve/bin/prosopopee", line 8, in <module>
    sys.exit(main())
  File "/home/toasti/Pictures/Prosopopee/ve/local/lib/python2.7/site-packages/prosopopee/prosopopee.py", line 634, in main
    build_index(settings, front_page_galleries_cover, templates)
  File "/home/toasti/Pictures/Prosopopee/ve/local/lib/python2.7/site-packages/prosopopee/prosopopee.py", line 549, in build_index
    Video=Video
  File "/home/toasti/Pictures/Prosopopee/ve/local/lib/python2.7/site-packages/jinja2/environment.py", line 1008, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/toasti/Pictures/Prosopopee/ve/local/lib/python2.7/site-packages/jinja2/environment.py", line 780, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "/home/toasti/Pictures/Prosopopee/ve/local/lib/python2.7/site-packages/prosopopee/themes/exposure/templates/index.html", line 1, in top-level template code
    {% extends "base.html" %}
  File "/home/toasti/Pictures/Prosopopee/ve/local/lib/python2.7/site-packages/prosopopee/themes/exposure/templates/base.html", line 33, in top-level template code
    {% block content %}
  File "/home/toasti/Pictures/Prosopopee/ve/local/lib/python2.7/site-packages/prosopopee/themes/exposure/templates/index.html", line 39, in block "content"
    {% if settings.show_date and gallery.date %}<div class="gallery-datetime">{{ gallery.date.strftime("%d %B %Y") }}</div>{% endif %}
jinja2.exceptions.UndefinedError: 'str object' has no attribute 'strftime'

Could you please help?

The "Themes" folder was empty, I downloaded the package and copied the themes manually into the folder.

Many thanks!

@Psycojoker
Copy link
Owner

Are you using python3 by any chance? That looks like your error (yeah, we never ported)

@toasti2000
Copy link
Author

toasti2000 commented Nov 5, 2019 via email

@Psycojoker
Copy link
Owner

Ah no, you are in python2, my bad :/

The error is actually that you date isn't written in a format that is parsed as a correct date, so you get a string instead and that produce this crash. Make sure to see if you have written the date in the correct format '-'

You can show me your yaml files instead if you prefer.

I admit that the error isn't really good :/

@toasti2000
Copy link
Author

toasti2000 commented Nov 5, 2019

Ahhhh, you are right, it was the date!
I have written it down in this way:

12-04-2018

Just changed to 2018-04-12 and all is fine.

I also defined an date_end, but only the "start date" will be shown.

This is my settings.yaml

`title: "Title"
sub_title: "Subtitle"
date: 2018-04-12
date_end: 2018-04-16
cover: IMG_20180412_135802.jpg
sections:

  • type: full-picture
    image: IMG_20180416_154535.jpg
    text:
    title: "Title"
    sub_title: "Subtitle"
    date: 2018-04-12
  • type: bordered-picture
    image: IMG_20180416_154043.jpg
  • type: text
    text: « Ship ahoi! »

What is wrong?
`
Thank you very much for your help!

I have another question... is it possible to provide a download link for the original files on the static website?
For example I publish some photo stories for my family and want that they are able to download the original files.

@Psycojoker
Copy link
Owner

"date_end" doesn't exist in this template https://github.com/Psycojoker/prosopopee/blob/master/prosopopee/themes/exposure/templates/index.html#L39 I don't know where you've found it?

@toasti2000
Copy link
Author

toasti2000 commented Nov 5, 2019

I have found that in the documentation:
https://prosopopee.readthedocs.io/en/latest/sections.html

When I add a video, I got this:

././Vacation: No such file or directory
Abort: ffmpeg command failed

Any idea? As I understand I must not configure anything for video until I want to use default settings, right? I have installed ffmpeg as mentioned in the documentation.

@toasti2000
Copy link
Author

The video problem was no problem... it was just a blank in the folder name :-/ Works like a charm now.

But the "date_end" would absolutely a very nice thing. It's in the official documentation, so is there another template available?

@Psycojoker
Copy link
Owner

Ah, "date_end" is only available for a few sections yes, not the one you've tried to use it for.

Would you be interested in sending a patch? I don't have that much time anymore for that project :/

@toasti2000
Copy link
Author

toasti2000 commented Nov 8, 2019 via email

@JocelynDelalande
Copy link

Hello !

@toasti2000 dare to post your patch in a Pull request ?

Sorry, but I have another question ;-) In Germany we have umlauts like Ä,
Ö, etc.... when my folders have umlauts I get this error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in
position 19: ordinal not in range(128)

It seems that it is not using UTF8 to handle the folders, the titles are OK.

Is it happening also with Python 3 ?

Maybe open another issue because this IS another issue :-) ?

@toasti2000
Copy link
Author

toasti2000 commented Mar 5, 2020 via email

@JocelynDelalande
Copy link

FYI, prosopopee is running perfectly fine for me with Python 3.7.

@toasti2000
Copy link
Author

toasti2000 commented Mar 6, 2020 via email

@JocelynDelalande
Copy link

Could you please tell me your installation steps?

python3 -m venv venv
source venv/bin/activate
pip install prosopopee

@toasti2000
Copy link
Author

toasti2000 commented Mar 9, 2020 via email

@beudbeud
Copy link
Collaborator

@toasti2000 hi in version 0.9.1 i add the possibility to have controls on video

@beudbeud beudbeud reopened this Mar 23, 2020
@toasti2000
Copy link
Author

toasti2000 commented Mar 23, 2020 via email

@beudbeud
Copy link
Collaborator

@toasti2000 you can do PR if you want share with everyone your version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants