Error: AssertionError: Failed to load any scenes for resolution 10m. Check input scenes.

Issue #1 new
Former user created an issue

Hello! I'm trying to run s2m mosaic for Sentinel-2 data (L2A). In the result of this is error:

Traceback (most recent call last): File "/home/ubuntu/sen2mosaic/sen2mosaic/mosaic.py", line 481, in <module> main(infiles, args.target_extent, args.epsg, resolution = args.resolution, start = args.start, end = args.end, cloud_buffer = args.cloud_buffer, colour_balance = args.colour_balance, processes = args.n_processes, output_dir = args.output_dir, output_name = args.output_name, masked_vals = masked_vals, verbose = args.verbose) File "/home/ubuntu/sen2mosaic/sen2mosaic/mosaic.py", line 399, in main assert len(scenes) > 0, "Failed to load any scenes for resolution %sm. Check input scenes."%str(res) AssertionError: Failed to load any scenes for resolution 10m. Check input scenes.

Can you help me, please? Thank you!

Comments (18)

  1. Samuel Bowers repo owner

    Hello there! Thanks for reporting the bug. We've seen something similar before, but I wonder if you could give a few more details? Could you let me know what command you ran? And could you confirm that the input data was level 2A, and contains data at 10 m resolution? Sam

  2. Hanna Yailymova

    Dear Sam,

    Thanks for your quick answer! It is very important for us.

    We have used the next command:

    s2m mosaic -te 159000 5400000 383000 5590000 -e 32635 -res 10 /home/ubuntu/s2/coreg/sen2cor/ --start 20180401 --end 20180830 -o /home/ubuntu/s2/coreg/test/res/

    and the output you can find in the figure below. Of course all of these folders contain data with 10 m resolution (after Sen2cor processing). The folder with 10 meters data is (for example) S2B_MSIL2A_20180413T085559_N0206_R007_T36UVA_20180413T103022.SAFE\GRANULE\L2A_T36UVA_A005753_20180413T085553\IMG_DATA\R10m\

    Maybe we need another data structure for using s2m mosaic? Thank you! Hanna

    run.PNG

  3. Samuel Bowers repo owner

    Hi Hanna, that's some bug you've found ;). I'll investigate on my end, looks like we have an issue with loading files. Could I ask that you test one more thing: does the script run if you set the resolution to 20 m?

  4. Samuel Bowers repo owner

    Dear Hanna, I've not been able to replicate your issue on my end. I ran a quick test of your study area, and the output looks pretty good! (see below for snippet).

    I suspect that something's worked worked strangely with your preprocessing with sen2cor. Could I ask you to send over a listing of the files/directories contained in one of your .SAFE files? (i.e. ls -R .../sen2cor/S2B_MSIL2A_20180926T092019_N0206_R093RT34UGA_20180926T132915.SAFE). The error you're seeing tends to occur when a file that sen2mosaic expects to see isn't present. It could also be an issue with sen2mosaic, but even if it's not it'd be good to work out a more useful warning than that

    ukraine.jpg

  5. Hanna Yailymova

    Dear Sam, Your output looks very nice!

    The result of the "ls -R S2B_MSIL2A_20180926T092019_N0206_R093_T34UGA_20180926T132915.SAFE" you can find on the figure below.

    Also, I see the difference between your's and our's name of .SAFE file:

    S2B_MSIL2A_20180926T092019_N0206_R093RT34UGA_20180926T132915.SAFE - your

    S2B_MSIL2A_20180926T092019_N0206_R093_T34UGA_20180926T132915.SAFE - our

    Maybe the problem with this name too? We have used the Sen2Cor (version 2.5.5).

    Thanks a lot for your help, it is very pleasure!

    data_structure.PNG

  6. Samuel Bowers repo owner

    Hi Hanna, Your input files look absolutely fine, all necessary files are there, sen2cor is up-to-date, all which leaves me a bit puzzled. The difference you spotted there was just a typo ;).

    The only way we're going to catch this one I think is with some better error messages, so I've updated the repo to output a bit more info. If you 'git pull' and try to re-run, let me know what you find!

    Sam

  7. Samuel Bowers repo owner

    Hi Hanna, thanks for that, that helps out a lot. I've made a small tweak, could you update sen2mosaic and let me know if the error remains? If it doesn't get it I have a few more things I'd like to try, so do let me know

  8. Samuel Bowers repo owner

    Hi Hanna, my working hypothesis is that something unusual has happened with your preprocessing with sen2cor, but I've not been able to replicate it so I can't figure out what. I think to nail down exactly what's happened, could you either send me one of your preprocessed L2A files (via dropbox or similar, to sam.bowers@ed.ac.uk), or let me know which commands you used to do the preprocessing? I'd love to figure out what's going on here!

  9. Samuel Bowers repo owner

    Thanks for that! Your files look absolutely fine, work well for me. Could you git pull and try once more? I've managed to locate an issue, which may or may not be the issue.

  10. Samuel Bowers repo owner

    Hi Hanna, I've rarely known a bug more stubborn! Would you be able to git pull and try once more? Hopefully you should get a more descriptive error message this time. Sam

  11. Samuel Bowers repo owner

    A possible solution: I think you might be missing the lxml module for Python. If you're using anaconda, you can get it with 'coda install -c lxml'. And if it still won't work, do let me know ;)

  12. Hanna Yailymova

    Dear Sam!

    We have done "git pull" and added the lxml module for Python and have the result for 20m (in figure).

    Thank you very much for your time and help!

    res.png

  13. Samuel Bowers repo owner

    Looks awesome! Thanks for pointing out the issue, I wouldn't have found that otherwise.

  14. Log in to comment