atpost
Posts: 3
Joined: Sat Dec 21, 2019 6:47 am

Re: Image viewer with transition between images

Mon Dec 23, 2019 12:46 pm

Hi Paddy,

I tested with a few pictures, 4, for over 48 hours and all went well.
While slideshow was playing, I added about 2000 pictures to the Pictures folder. The slideshow showed the new pictures without issue. Several hours later I rebooted the pi, and the slideshow won't start anymore.
Thinking that it's because of the large number of pictures, I moved most of the 2000 pictures to a subfolder and only left 3 pictures in the Picture folder - but still no slideshow.

This is the error in the cron log I get since I added the large number of pictures. Still get the error, even after pictures were removed.

Code: Select all

script started
  File "/home/pi/pi3d_demos/PictureFrame.py", line 161
    `    file_list = temp_list_first + temp_list_last
    ^
SyntaxError: invalid syntax
script finished

User avatar
paddyg
Posts: 2460
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Image viewer with transition between images

Mon Dec 23, 2019 2:24 pm

That looks an odd error message. Let me see what the lines around 161 look like in your version of PictureFrame.py, maybe something sneaked in while you were editing. They should be

Code: Select all

    random.shuffle(temp_list_first)
    random.shuffle(temp_list_last)
    file_list = temp_list_first + temp_list_last
  else:
    file_list.sort() # if not suffled; sort by name
i.e. the f of file_list should line up with the r of random. And there shouldn't be any ` characters. (Which might be part of the error message formatting.)

Paddy
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

Return to “General discussion”