prosopopee icon indicating copy to clipboard operation
prosopopee copied to clipboard

Errors when starting prosopopee

Open toasti2000 opened this issue 4 years ago • 18 comments

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!

toasti2000 avatar Nov 04 '19 16:11 toasti2000

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

Psycojoker avatar Nov 05 '19 07:11 Psycojoker

How can I ensure that I use V2? I did the installation exactly as written in the documentation.

When I activated ve and install prosopopee I get this information:

(ve) basti@Basti-LXM:~$ pip install prosopopee

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Requirement already satisfied: prosopopee in ./ve/lib/python2.7/site-packages (0.8.2) Requirement already satisfied: docopt in ./ve/lib/python2.7/site-packages (from prosopopee) (0.6.2) Requirement already satisfied: jinja2 in ./ve/lib/python2.7/site-packages (from prosopopee) (2.10.3) Requirement already satisfied: path.py in ./ve/lib/python2.7/site-packages (from prosopopee) (11.5.2) Requirement already satisfied: future in ./ve/lib/python2.7/site-packages (from prosopopee) (0.18.2) Requirement already satisfied: ruamel.yaml in ./ve/lib/python2.7/site-packages (from prosopopee) (0.16.5) Requirement already satisfied: MarkupSafe>=0.23 in ./ve/lib/python2.7/site-packages (from jinja2->prosopopee) (1.1.1) Requirement already satisfied: importlib-metadata>=0.5 in ./ve/lib/python2.7/site-packages (from path.py->prosopopee) (0.23) Requirement already satisfied: backports.os; python_version == "2.7" and sys_platform == "linux2" in ./ve/lib/python2.7/site-packages (from path.py->prosopopee) (0.1.1) Requirement already satisfied: ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.8" in ./ve/lib/python2.7/site-packages (from ruamel.yaml->prosopopee) (0.2.0) Requirement already satisfied: ruamel.ordereddict; platform_python_implementation == "CPython" and python_version <= "2.7" in ./ve/lib/python2.7/site-packages (from ruamel.yaml->prosopopee) (0.4.14) Requirement already satisfied: zipp>=0.5 in ./ve/lib/python2.7/site-packages (from importlib-metadata>=0.5->path.py->prosopopee) (0.6.0) Requirement already satisfied: configparser>=3.5; python_version < "3" in ./ve/lib/python2.7/site-packages (from importlib-metadata>=0.5->path.py->prosopopee) (4.0.2) Requirement already satisfied: contextlib2; python_version < "3" in ./ve/lib/python2.7/site-packages (from importlib-metadata>=0.5->path.py->prosopopee) (0.6.0.post1) Requirement already satisfied: pathlib2; python_version == "3.4." or python_version < "3" in ./ve/lib/python2.7/site-packages (from importlib-metadata>=0.5->path.py->prosopopee) (2.3.5) Requirement already satisfied: more-itertools in ./ve/lib/python2.7/site-packages (from zipp>=0.5->importlib-metadata>=0.5->path.py->prosopopee) (5.0.0) Requirement already satisfied: six in ./ve/lib/python2.7/site-packages (from pathlib2; python_version == "3.4." or python_version < "3"->importlib-metadata>=0.5->path.py->prosopopee) (1.12.0) Requirement already satisfied: scandir; python_version < "3.5" in ./ve/lib/python2.7/site-packages (from pathlib2; python_version == "3.4.*" or python_version < "3"->importlib-metadata>=0.5->path.py->prosopopee) (1.10.0)

So all seems to be installed what needed.

I also tried the docker container, there I got the message "Abort: I can't find a settings.yaml in the current working directory".

On Tue, 5 Nov 2019, 08:19 Bram, [email protected] wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Psycojoker/prosopopee/issues/98?email_source=notifications&email_token=AKY2DCGTSH4TM2O6RX2AZBTQSEM7LA5CNFSM4JIWJDW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDB25OA#issuecomment-549695160, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKY2DCANEHDU5IFVHO2QJPDQSEM7LANCNFSM4JIWJDWQ .

toasti2000 avatar Nov 05 '19 10:11 toasti2000

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 :/

Psycojoker avatar Nov 05 '19 11:11 Psycojoker

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.

toasti2000 avatar Nov 05 '19 12:11 toasti2000

"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?

Psycojoker avatar Nov 05 '19 12:11 Psycojoker

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 avatar Nov 05 '19 12:11 toasti2000

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?

toasti2000 avatar Nov 06 '19 21:11 toasti2000

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 :/

Psycojoker avatar Nov 07 '19 08:11 Psycojoker

I already added the needed code to my local copy for a test - seems to work. I will create a branch and do the changes next week.

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.

Any idea?

Am Do., 7. Nov. 2019 um 09:11 Uhr schrieb Bram [email protected]:

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 :/

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Psycojoker/prosopopee/issues/98?email_source=notifications&email_token=AKY2DCFKFQGMXIPIGXPCN4DQSPEUPA5CNFSM4JIWJDW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDLSKEQ#issuecomment-550970642, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKY2DCEHE6N4GQZ6O2TVINDQSPEUPANCNFSM4JIWJDWQ .

toasti2000 avatar Nov 08 '19 23:11 toasti2000

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 :-) ?

JocelynDelalande avatar Feb 26 '20 16:02 JocelynDelalande

Hello, I think it is not working with Python3, so I only tested it with 2.7 I try to post the patch respectively extension I did by the latest of the end of the week.

Am Mi., 26. Feb. 2020 um 17:12 Uhr schrieb JocelynDelalande < [email protected]>:

Hello !

@toasti2000 https://github.com/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 :-) ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Psycojoker/prosopopee/issues/98?email_source=notifications&email_token=AKY2DCHNNHXYK5LFG2UGPNTRE2IIPA5CNFSM4JIWJDW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENA3MKQ#issuecomment-591509034, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKY2DCGIBTMUAUMPNDF36D3RE2IIPANCNFSM4JIWJDWQ .

toasti2000 avatar Mar 05 '20 16:03 toasti2000

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

JocelynDelalande avatar Mar 06 '20 19:03 JocelynDelalande

Could you please tell me your installation steps? Many thanks!

On Fri, 6 Mar 2020, 20:32 JocelynDelalande, [email protected] wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Psycojoker/prosopopee/issues/98?email_source=notifications&email_token=AKY2DCF3X4ZALSXUENGCX4LRGFFWJA5CNFSM4JIWJDW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOCRWDI#issuecomment-595925773, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKY2DCGYSIC45TYU6B2GCVDRGFFWJANCNFSM4JIWJDWQ .

toasti2000 avatar Mar 06 '20 20:03 toasti2000

Could you please tell me your installation steps?

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

JocelynDelalande avatar Mar 07 '20 16:03 JocelynDelalande

Thank you very much - I will try this on another machine.

Prosopopee is a really nice way to create digital memories (but I also try to create a bit analog on paper ;-)). Is there any chance to include controls for the videos? Play / Pause buttons? On mobile phones we have controls, not on a desktop computer. This would be very helpful!

Am Sa., 7. März 2020 um 17:43 Uhr schrieb JocelynDelalande < [email protected]>:

Could you please tell me your installation steps?

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Psycojoker/prosopopee/issues/98?email_source=notifications&email_token=AKY2DCBXMHQ5AQWPHGRSAKTRGJ2ULA5CNFSM4JIWJDW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOD54QY#issuecomment-596106819, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKY2DCA3KEZP5KXJSHOJWP3RGJ2ULANCNFSM4JIWJDWQ .

toasti2000 avatar Mar 09 '20 15:03 toasti2000

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

beudbeud avatar Mar 23 '20 10:03 beudbeud

Hello, Thank you! In the meantime I just edited my local version and added controls, disabled loops and Auto Play.

On Mon, 23 Mar 2020, 11:02 Adrien Beudin, [email protected] wrote:

@toasti2000 https://github.com/toasti2000 hi in version 0.9.1 i add the possibility to have controls on video

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Psycojoker/prosopopee/issues/98#issuecomment-602496407, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKY2DCFWNPUSC2ZODGKTB53RI4XS5ANCNFSM4JIWJDWQ .

toasti2000 avatar Mar 23 '20 12:03 toasti2000

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

beudbeud avatar Mar 23 '20 22:03 beudbeud