haltakov / simple-photo-gallery

Beautiful and simple photo galleries that help you tell your story. Free and open-source.
https://haltakov.net/simple-photo-gallery
MIT License
194 stars 51 forks source link

Gallery Build with date - not working #116

Closed DiverXer0 closed 2 years ago

DiverXer0 commented 2 years ago

JSON: { "images_data_file": ".\\images_data.json", "public_path": ".\\public", "templates_path": ".\\templates", "images_path": ".\\public\\images\\photos", "thumbnails_path": ".\\public\\images\\thumbnails", "thumbnail_height": 160, "title": "Belgium", "description": "Default description of my gallery", "background_photo": "", "url": "", "background_photo_offset": 30, "disbale_captions": false "date_format": "%d.%m.%Y" }

Errors with;

E:\Photos\WD\New\Belgium>gallery-build Traceback (most recent call last): File "c:\program files\python39\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\program files\python39\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\Users\dan\AppData\Roaming\Python\Python39\Scripts\gallery-build.exe__main.py", line 7, in File "C:\Users\dan\AppData\Roaming\Python\Python39\site-packages\simplegallery\gallery_build.py", line 111, in main gallery_config = spg_common.read_gallery_config(gallery_config_path) File "C:\Users\dan\AppData\Roaming\Python\Python39\site-packages\simplegallery\common.py", line 32, in read_gallery_config return json.load(gallery_in) File "c:\program files\python39\lib\json\init.py", line 293, in load return loads(fp.read(), File "c:\program files\python39\lib\json\init__.py", line 346, in loads return _default_decoder.decode(s) File "c:\program files\python39\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "c:\program files\python39\lib\json\decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 14 column 2 (char 441)

E:\Photos\WD\New\Belgium>

haltakov commented 2 years ago

You are missing a comma in the JSON file just before "data_format". It should be like that:

{
   "images_data_file":".\\images_data.json",
   "public_path":".\\public",
   "templates_path":".\\templates",
   "images_path":".\\public\\images\\photos",
   "thumbnails_path":".\\public\\images\\thumbnails",
   "thumbnail_height":160,
   "title":"Belgium",
   "description":"Default description of my gallery",
   "background_photo":"",
   "url":"",
   "background_photo_offset":30,
   "disbale_captions":false,
   "date_format":"%d.%m.%Y"
}
DiverXer0 commented 2 years ago

That's just embarrassing for me!