-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Hello GustavePate,
just setting up lychee on my ubuntu 16.04 server with apache2, php7 and anaconda 5.0 as python interpreter. lychee works perfectly, also the lycheesync plugin is a neat tool in general!
however i'm running into some problems when i try to batch sync several folders (10 with about 30 photos each, no subfolders) to my lychee installation. sync works fine for most of the images, but some make problems. not sure though if i understand the errors correctly. i've changed the php.ini settings for data handling to some decent values so that this shouldn't cause problems for the script i'm running for the sync.
first problem seems to relate to the -r flag i'm using for the sync. as far as i can see, the albums are being deleted, however, for every album i get this error:
--- Logging error ---
Traceback (most recent call last):
File "/home/my_name/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/my_name/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/my_name/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/my_name/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/home/my_name/anaconda3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/my_name/anaconda3/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/my_name/lycheesync/lycheesync/sync.py", line 116, in
main()
File "/home/my_name/anaconda3/lib/python3.6/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/my_name/lycheesync/lycheesync/sync.py", line 105, in main
s.sync()
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 393, in sync
filelist = self.dao.eraseAlbum(album['id'])
File "/home/my_name/lycheesync/lycheesync/lycheedao.py", line 382, in eraseAlbum
logger.debug("album photos erased: ", album_id)
Message: 'album photos erased: '
Arguments: (15083427913245,)
--
second problem relates to some individual photos that can't be synced, like this one here:
ERROR;2017-10-18 18:07:32,195; lycheesync.lycheesyncer; [<class 'decimal.InvalidOperation'>]
Traceback (most recent call last):
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 426, in sync
photo = LycheePhoto(pid, self.conf, f, album)
File "/home/my_name/lycheesync/lycheesync/lycheemodel.py", line 222, in init
s = decimal.Decimal(s).quantize(decimal.Decimal('1'), rounding=decimal.ROUND_05UP)
decimal.InvalidOperation: [<class 'decimal.InvalidOperation'>]
ERROR;2017-10-18 18:07:32,195; lycheesync.lycheesyncer; could not add ID3857_Deutschland_Bautzen.jpg to album sorbLL
--
and the last one seems to be related to rgba encoding of a couple of photos. also no idea what is going wrong here or how to fix it:
ERROR;2017-10-18 18:07:20,189; lycheesync.lycheesyncer; [<class 'decimal.InvalidOperation'>]
Traceback (most recent call last):
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 426, in sync
photo = LycheePhoto(pid, self.conf, f, album)
File "/home/my_name/lycheesync/lycheesync/lycheemodel.py", line 222, in init
s = decimal.Decimal(s).quantize(decimal.Decimal('1'), rounding=decimal.ROUND_05UP)
decimal.InvalidOperation: [<class 'decimal.InvalidOperation'>]
ERROR;2017-10-18 18:07:20,189; lycheesync.lycheesyncer; could not add ID9608_Switzerland_Zermatt.jpg to album MA_EinsNull
ERROR;2017-10-18 18:07:20,540; lycheesync.lycheesyncer; cannot write mode RGBA as JPEG
Traceback (most recent call last):
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 602, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 430, in sync
self.makeThumbnail(photo)
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 148, in makeThumbnail
photo.thumbnailfullpath = self.thumbIt(sizes[0], photo, destpath, destfiles[0])
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 129, in thumbIt
img.save(destimage, quality=99)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/Image.py", line 1893, in save
save_handler(self, fp, filename)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 604, in _save
raise IOError("cannot write mode %s as JPEG" % im.mode)
OSError: cannot write mode RGBA as JPEG
ERROR;2017-10-18 18:07:20,540; lycheesync.lycheesyncer; could not add ID9652_Switzerland_Täsch.jpg to album MA_EinsNull
ERROR;2017-10-18 18:07:20,547; lycheesync.lycheesyncer; [<class 'decimal.InvalidOperation'>]
Traceback (most recent call last):
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 426, in sync
photo = LycheePhoto(pid, self.conf, f, album)
File "/home/my_name/lycheesync/lycheesync/lycheemodel.py", line 222, in init
s = decimal.Decimal(s).quantize(decimal.Decimal('1'), rounding=decimal.ROUND_05UP)
decimal.InvalidOperation: [<class 'decimal.InvalidOperation'>]
ERROR;2017-10-18 18:07:20,547; lycheesync.lycheesyncer; could not add ID9653_Switzerland_Täsch.jpg to album MA_EinsNull
ERROR;2017-10-18 18:07:20,560; lycheesync.lycheesyncer; cannot write mode RGBA as JPEG
Traceback (most recent call last):
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 602, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 430, in sync
self.makeThumbnail(photo)
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 148, in makeThumbnail
photo.thumbnailfullpath = self.thumbIt(sizes[0], photo, destpath, destfiles[0])
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 129, in thumbIt
img.save(destimage, quality=99)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/Image.py", line 1893, in save
save_handler(self, fp, filename)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 604, in _save
raise IOError("cannot write mode %s as JPEG" % im.mode)
OSError: cannot write mode RGBA as JPEG
ERROR;2017-10-18 18:07:20,560; lycheesync.lycheesyncer; could not add ID9654_Switzerland_Täsch.jpg to album MA_EinsNull
ERROR;2017-10-18 18:07:20,572; lycheesync.lycheesyncer; cannot write mode RGBA as JPEG
Traceback (most recent call last):
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 602, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 430, in sync
self.makeThumbnail(photo)
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 148, in makeThumbnail
photo.thumbnailfullpath = self.thumbIt(sizes[0], photo, destpath, destfiles[0])
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 129, in thumbIt
img.save(destimage, quality=99)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/Image.py", line 1893, in save
save_handler(self, fp, filename)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 604, in _save
raise IOError("cannot write mode %s as JPEG" % im.mode)
OSError: cannot write mode RGBA as JPEG
ERROR;2017-10-18 18:07:20,572; lycheesync.lycheesyncer; could not add ID9655_Switzerland_Täsch.jpg to album MA_EinsNull
ERROR;2017-10-18 18:07:20,592; lycheesync.lycheesyncer; cannot write mode RGBA as JPEG
Traceback (most recent call last):
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 602, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 430, in sync
self.makeThumbnail(photo)
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 148, in makeThumbnail
photo.thumbnailfullpath = self.thumbIt(sizes[0], photo, destpath, destfiles[0])
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 129, in thumbIt
img.save(destimage, quality=99)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/Image.py", line 1893, in save
save_handler(self, fp, filename)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 604, in _save
raise IOError("cannot write mode %s as JPEG" % im.mode)
OSError: cannot write mode RGBA as JPEG
ERROR;2017-10-18 18:07:20,592; lycheesync.lycheesyncer; could not add ID9656_Switzerland_Täsch.jpg to album MA_EinsNull
ERROR;2017-10-18 18:07:20,624; lycheesync.lycheesyncer; cannot write mode RGBA as JPEG
Traceback (most recent call last):
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 602, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 430, in sync
self.makeThumbnail(photo)
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 148, in makeThumbnail
photo.thumbnailfullpath = self.thumbIt(sizes[0], photo, destpath, destfiles[0])
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 129, in thumbIt
img.save(destimage, quality=99)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/Image.py", line 1893, in save
save_handler(self, fp, filename)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 604, in _save
raise IOError("cannot write mode %s as JPEG" % im.mode)
OSError: cannot write mode RGBA as JPEG
ERROR;2017-10-18 18:07:20,624; lycheesync.lycheesyncer; could not add ID9657_Switzerland_Täsch.jpg to album MA_EinsNull
ERROR;2017-10-18 18:07:20,633; lycheesync.lycheesyncer; cannot write mode RGBA as JPEG
Traceback (most recent call last):
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 602, in _save
rawmode = RAWMODE[im.mode]
KeyError: 'RGBA'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 430, in sync
self.makeThumbnail(photo)
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 148, in makeThumbnail
photo.thumbnailfullpath = self.thumbIt(sizes[0], photo, destpath, destfiles[0])
File "/home/my_name/lycheesync/lycheesync/lycheesyncer.py", line 129, in thumbIt
img.save(destimage, quality=99)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/Image.py", line 1893, in save
save_handler(self, fp, filename)
File "/home/my_name/anaconda3/lib/python3.6/site-packages/PIL/JpegImagePlugin.py", line 604, in _save
raise IOError("cannot write mode %s as JPEG" % im.mode)
OSError: cannot write mode RGBA as JPEG
ERROR;2017-10-18 18:07:20,633; lycheesync.lycheesyncer; could not add ID9658_Switzerland_Täsch.jpg to album MA_EinsNull
--
apart from this the script freezes at a certain point, as far as i can see it's always at the same image file although there seems to be nothing special about it. also i've set the max upload limit for php to 1000, therefore the number of files shouldn't be a problem.
any idea maybe where to look for a solution for this?
thanks in advance, also for this nice plugin.
Christoph