lquirosd/P2PaLA

error while running the pre trained model in google colab

akshay94950 opened this issue · 3 comments

the error is as shown below:
2020-04-02 09:33:10,254 - optparse - INFO - Reading configuration from config_ALAR_min_model_17_12_18_inference.txt
2020-04-02 09:33:10,263 - P2PaLA - INFO - Working on prod inference...
2020-04-02 09:33:10,268 - P2PaLA - INFO - Results will be saved to ./work/results/prod
2020-04-02 09:33:10,844 - P2PaLA - INFO - Resumming from model ALAR_min_model_17_12_18.pth
2020-04-02 09:33:11,408 - P2PaLA - INFO - Preprocessing data from ./images
Premature end of JPEG file
Traceback (most recent call last):
File "P2PaLA.py", line 1268, in
main()
File "P2PaLA.py", line 1250, in main
out_folder=res_path,
File "/content/gdrive/My Drive/P2PaLA-master/data/imgprocess.py", line 187, in gen_page
os.path.realpath(self.img_data[img_id]), os.path.join(out_folder, img_name)
File "/content/gdrive/My Drive/P2PaLA-master/data/imgprocess.py", line 503, in symlink_force
raise e
File "/content/gdrive/My Drive/P2PaLA-master/data/imgprocess.py", line 497, in symlink_force
os.symlink(target, link_name)
OSError: [Errno 95] Operation not supported: '/content/gdrive/My Drive/P2PaLA-master/images/5.jpeg' -> './work/results/prod/5.jpeg'

Hi
Normally the message "Premature end of JPEG file" means that you have some corrupt file in your "./images" folder.

Regards,

@lquirosd i changed the images but issue still exists.is it because of due to i running it in colab?how to change the location of saving image ./work/results/prod/Copy of page1.jpg' to "/content/gdrive/My Drive/work/results/prod/Copy of page1.jpg"

Hi,
Images are never copied, we do symbolic links instead.