Hello everyone,
I am newbie to python resdata. I am on widows WSL and using VSCode. I have listed the steps that I have tried. Please let me know what I am doing wrong as I am getting an error message.
- Created a new directory called "resdatatest" on WSL (\wsl.localhost\Ubuntu-22.04\home\ynot\mydata\sourcecode\mytest\resdatatest)
- cd to that directory.
- Opened code (code .)
- create virtual environment "virtualenv -p /usr/bin/python3.11 myresenv"
- Activated the virtual environment (source myresenv/bin/activate)
- Now I can see the virtual environment name is just in front of the shell root.
(myresenv) ynot@COG-NishanK:~/mydata/sourcecode/mytest/resdatatest$
- Now I installed resdata (pip install resdata)
- I verified the resdata packages.
Noticed "\wsl.localhost\Ubuntu-22.04\home\ynot\mydata\sourcecode\mytest\resdatatest\myresenv\lib\python3.11\site-packages\resdata" and lot more other packages like "cwrap".
- Now I placed two files called "HistoryMatch_07-01-2024.UNSMRY" and "HistoryMatch_07-01-2024.SMSPEC" inside "\wsl.localhost\Ubuntu-22.04\home\ynot\mydata\sourcecode\mytest\resdatatest" and executed the following code
`My Code:
def convert_files():
converted_files = []
if not os.path.isfile("HistoryMatch_07-01-2024.SMSPEC"):
print("HistoryMatch_07-01-2024.SMSPEC file does not exist")
else:
print("HistoryMatch_07-01-2024.SMSPEC file exist")
ecl_sum = Summary("HistoryMatch_07-01-2024")
ecl_sum.export_csv(f"HistoryMatch_07-01-2024_SUMMARY.csv")
converted_files.append(f"HistoryMatch_07-01-2024_SUMMARY.csv")
return converted_files`
The error that I am getting
`Error:
HistoryMatch_07-01-2024.SMSPEC file exist
Traceback (most recent call last):
File "/home/ynot/mydata/sourcecode/mytest/resdatatest/covertest.py", line 73, in <module>
converted_files = convert_files()
^^^^^^^^^^^^^^^
File "/home/ynot/mydata/sourcecode/mytest/resdatatest/covertest.py", line 46, in convert_files
ecl_sum = Summary("HistoryMatch_07-01-2024")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ynot/mydata/sourcecode/mytest/resdatatest/myresenv/lib/python3.11/site-packages/resdata/summary/rd_sum.py", line 256, in __init__
raise IOError(
OSError: Failed to create summary instance from argument:HistoryMatch_07-01-2024`
Any help is greatly appreciated.
Hello everyone,
I am newbie to python resdata. I am on widows WSL and using VSCode. I have listed the steps that I have tried. Please let me know what I am doing wrong as I am getting an error message.
(myresenv) ynot@COG-NishanK:~/mydata/sourcecode/mytest/resdatatest$
Noticed "\wsl.localhost\Ubuntu-22.04\home\ynot\mydata\sourcecode\mytest\resdatatest\myresenv\lib\python3.11\site-packages\resdata" and lot more other packages like "cwrap".
`My Code:
The error that I am getting
`Error:
Any help is greatly appreciated.