How to use dcc.Upload with LAS files

I am trying to use dcc.Upload for file in LAS format but keeps saying “Unsupported file format”. Here is the code I have in the app. Thanks.
*elif ‘las’ in filename: *

  • decoded = b"“”<your_las_file_content_here>“”"*
  • las = lasio.read(io.BytesIO(decoded)) # Read LAS file*
  • df = las.df() # Convert LAS data to DataFrame*
  • df.reset_index(inplace=True)*

Hey @mannygeo welcome to the forums.

Could you add some information? What are LAS files? The upload is not restricted to any file type as far as I know, you have to take care of the parsing, though.

Could you provide the code you have right now and a LAS file?

Hi @AIMPED,

Thank you for your reply. Decided to use csv or Excel for files to upload instead of LAS. Cheers.

1 Like