On Wednesday, September 4, 2019 at 11:09:06 AM UTC-7, Rahul wrote: > > Hi Dave, > > Sorry for the delay - I got busy but - Thanks for pushing me I > worked on it today and now it is finally *RESOLVED!! Yay!! * > > There were two errors - > > 1] <type 'exceptions.IOError'>(cannot open resource) > 2] NameError: global name 'watermark_font' is not defined > > These were because the system could not find the *font *I specified in > the code. As usual it worked flawlessly on windows but failed on Linux - I > applied the previous os checks and specified default fonts from the system > and then it worked. I re-instated my try-except blocks back and tested it. > It is working properly now. One major error resolved. > > THANK YOU FOR ALL THE SUGGESTIONS AND GUIDANCE :-) > > Regards, > > *Rahul * >
Congratulations! /dps > > > On Wednesday, September 4, 2019 at 1:54:48 AM UTC+5:30, Dave S wrote: >> >> >> >> On Saturday, August 31, 2019 at 6:54:21 PM UTC-7, Rahul wrote: >>> >>> To Add - >>> >>> [Sat Aug 31 18:02:10.901023 2019] [wsgi:error] [pid 3810] [client >>>> 95.163.255.151:41074 >>>> <http://www.google.com/url?q=http%3A%2F%2F95.163.255.151%3A41074&sa=D&sntz=1&usg=AFQjCNHSbY1o2xX_PM4TgsoVfr-l9gKKDA>] >>>> >>>> WARNING:root:Unable to write to file >>>> /home/www-data/web2py/applications/artpic/languages/ru.py >>>> >>> >>> What's trying to write to this file? >>> [Rahul] This is not me. I am not trying to write anything to this file >>> as I dont use it - I donk know about it. I gave the write permissions to >>> language folder to resolve the issue. It got resolved and it is not showing >>> that error in the logs >>> >>> >> That may be a web2py thing. I see that some of my languages/*.py don't >> have the same date; most show 2015-12-26, but zh-cn is 2019-08-06. >> >> (and a couple of them have the +x permission). >> >> >>> I am not sure about the r artifact - I did not put anything like that. >>> >>> >> I suspect your logging tool, but keep an eye on it. >> >> Aside from that, I'm missing whatever is wrong. Let's know when you have >> the traceback from the exception. >> >> >> Rahul >>> >>> >>> >> /dps >> >> >>> On Sun, Sep 1, 2019 at 5:15 AM Dave S <snide...@gmail.com> wrote: >>> >>>> >>>> >>>> On Saturday, August 31, 2019 at 6:40:26 AM UTC-7, Rahul wrote: >>>>> >>>>> Hi Dave, >>>>> I finally found the issue where the magic was with default >>>>> folder path specified in db.py. I rectified it in code where-ever I had >>>>> defined for other upload types aswell and it works properly. Now the >>>>> files >>>>> do get saved to the desired path. >>>>> >>>> >>>> Yay! >>>> >>>> >>>> >>>>> *but the THUMBNAIL file saving issue still persists on linux.* Again >>>>> this works properly in Windows. >>>>> [...] >>>>> >>>> >>>> >>>>> [Sat Aug 31 18:00:20.813518 2019] [wsgi:error] [pid 3806] [client >>>>> 42.108.232.228:38975] Cannot create thumbnail (un-recognized format) >>>>> for: /home/www-data/web2py/applications/artpic/stati$ >>>>> >>>> >>>> Hmmm .... >>>> >>>>> >>>>> [Sat Aug 31 18:02:09.456898 2019] [wsgi:error] [pid 3810] [client >>>>> 95.163.255.151:41074] WARNING:root:Unable to write to file >>>>> /home/www-data/web2py/applications/artpic/languages/ru.py >>>>> [Sat Aug 31 18:02:09.685699 2019] [wsgi:error] [pid 3810] [client >>>>> 95.163.255.151:41074] WARNING:root:Unable to write to file >>>>> /home/www-data/web2py/applications/artpic/languages/ru.py >>>>> [Sat Aug 31 18:02:10.900764 2019] [wsgi:error] [pid 3810] [client >>>>> 95.163.255.151:41074] WARNING:root:Unable to write to file >>>>> /home/www-data/web2py/applications/artpic/languages/ru.py >>>>> [Sat Aug 31 18:02:10.901023 2019] [wsgi:error] [pid 3810] [client >>>>> 95.163.255.151:41074 >>>>> <http://www.google.com/url?q=http%3A%2F%2F95.163.255.151%3A41074&sa=D&sntz=1&usg=AFQjCNHSbY1o2xX_PM4TgsoVfr-l9gKKDA>] >>>>> >>>>> WARNING:root:Unable to write to file >>>>> /home/www-data/web2py/applications/artpic/languages/ru.py >>>>> >>>> >>>> What's trying to write to this file? >>>> >>>> >>>> >>>>> [...] >>>>> >>>> [Sat Aug 31 18:27:17.451565 2019] [wsgi:error] [pid 5696] [client >>>>> 42.108.232.228:34651] ----------------, referer: >>>>> http://artpic.in/upload-fotoz >>>>> [Sat Aug 31 18:27:17.451647 2019] [wsgi:error] [pid 5696] [client >>>>> 42.108.232.228:34651] infile: >>>>> /home/www-data/web2py/applications/artpic/static/user_uploads/fotoz.upload_photo.b404a9b372$ >>>>> [Sat Aug 31 18:27:17.451668 2019] [wsgi:error] [pid 5696] [client >>>>> 42.108.232.228:34651] thumbnail_filename: 133.thumbnail.jpg, >>>>> referer: http://artpic.in/upload-fotoz >>>>> [Sat Aug 31 18:27:17.451690 2019] [wsgi:error] [pid 5696] [client >>>>> 42.108.232.228:34651] thumbpath and outfile: >>>>> /home/www-data/web2py/applications/artpic/static/thumbs/133.thumbnail.jpg, >>>>> >>>>> r$ >>>>> [Sat Aug 31 18:27:19.289744 2019] [wsgi:error] [pid 5696] [client >>>>> 42.108.232.228:34651] Cannot create thumbnail (un-recognized format) >>>>> for: /home/www-data/web2py/applications/artpic/stati$ >>>>> >>>>> *CODE - FOR THUMBNAIL* >>>>> [...] >>>>> >>>> except IOError: >>>>> print "Cannot create thumbnail (un-recognized format) >>>>> for: ", infile >>>>> >>>>> >>>>> * Please suggest on how to get the thumbnail to save in debian box - >>>>> I'll try it again after removing the try and catch blocks and get* >>>>> >>>>> >>>> *raw ticket if any tomorrow* >>>>> >>>> >>>> Your except is not printing the exception itself, and what it does >>>> print is misleading (un-recognized format for an IOError?) and the >>>> filename >>>> printed may not be the one with the IOError. First check ... make sure >>>> the thumbs directory exists and is writable. Is the ', r' appended to the >>>> line just an artifact of your logging tool? (I see "referer: >>>> hsttp://artpic.ini/upload-fotoz" on some other lines). >>>> >>>> You're definitely getting closer! >>>> >>>> /dps >>>> >>>> -- >>>> Resources: >>>> - http://web2py.com >>>> - http://web2py.com/book (Documentation) >>>> - http://github.com/web2py/web2py (Source code) >>>> - https://code.google.com/p/web2py/issues/list (Report Issues) >>>> --- >>>> You received this message because you are subscribed to a topic in the >>>> Google Groups "web2py-users" group. >>>> To unsubscribe from this topic, visit >>>> https://groups.google.com/d/topic/web2py/Gn-cqZjDURk/unsubscribe. >>>> To unsubscribe from this group and all its topics, send an email to >>>> web...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/web2py/b6bf42c1-6d57-4b53-ae8e-c963d116bdfc%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/web2py/b6bf42c1-6d57-4b53-ae8e-c963d116bdfc%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/0c992f52-cf40-4333-9353-c700cbf9195f%40googlegroups.com.