Closed almersawi closed 1 year ago
Could you paste an example LAS file that will cause the error? An example will help to analyze the issue. Thanks.
Thanks for the error report @almersawi
I suspect the name of the depth curve is hard coded somewhere in the code that you're trying to run. I've gotten the same error before when I've done that.
Something in the code you're running states that the name of the depth curve is 'DEPT'. When that curve name doesn't exist in a LAS file, your code can't find it and will produce that error.
I've loaded a well into the demo webpage that had a depth curve named "DEPTH2" and it didn't produce the error, so I suspect the problem isn't there? https://justingosses.github.io/wellioviz/demo.html
Can you tell us whether you get this error in one of the demos or how you're using wellioviz? It would help debug. Thank you.
Thanks for reply @JustinGOSSES this is my code workflow:
@JustinGOSSES NOTE: the file las file that produces this error can not be read with wellio and gives me this error when I try to load it to wellioviz demo page
Uncaught TypeError: Cannot read property 'split' of undefined at splitLineofType1 (bundle.js:22171) at las2json (bundle.js:22199) at convert_and_startHelpers (main.js:139) at HTMLButtonElement.onclick (demo.html:98)
So, I used another package to read this file. The parsing process succeeds but wellioviz gives me the mentioned error regarding to depth header
Hmm, sounds like maybe you have an edge case in terms of how the LAS file is built. Could you share the file? If log is proprietary, maybe change the name and replace all the curve values with random numbers?
@almersawi, Is there an error message when trying to read the file with Wellio.js instead of Wellioviz?
Also if the file is proprietary, you could run it through LasCheck, https://github.com/MandarJKulkarni/lascheck, and see if it reports any LAS non-conformities. LasCheck is a python based tool so you would need python install for this to work.
pip install lascheck
python
>>> las = lascheck.read('sample.las')
>>> las.check_conformity()
>>> las.get_non_conformities()
Thanks, DC
Triage notes for Uncaught TypeError: Cannot read property 'split' of undefined at splitLineofType1 (bundle.js:22171) at las2json (bundle.js:22199) at convert_and_startHelpers (main.js:139) at HTMLButtonElement.onclick (demo.html:98)
This looks like it is occurring after wellio (via wellioviz) parses the ~V section then parses the 'WRAP' line. However the 'WRAP' line seems to be undefined
causing the 'split' to be undefined on an empty object at splitLineofType1().
Is it possible the LAS file is in an encoding that wellio.js/wellioviz is unfamiliar with?
One example of determining encoding: https://stackoverflow.com/questions/3710374/get-encoding-of-a-file-in-windows @almersawi
closing as got now response enabling full debugging
Describe the bug When trying to display a log after .Las file read I face this error. But this doesn't happen in all Las files I tried
ERROR TypeError: Cannot read property 'DEPT' of undefined at Object.curveBox (index.js:940)