You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "xbtools.py", line 7, in <module>
results = XBeachModelAnalysis('Test', '/Users/lsarmento/xbeach/xbtools_test')
File "/usr/local/anaconda3/lib/python3.8/site-packages/xbTools/xbeachpost.py", line 39, in __init__
self.get_metadata()
File "/usr/local/anaconda3/lib/python3.8/site-packages/xbTools/xbeachpost.py", line 60, in get_metadata
with open(self.model_path+'\\XBlog.txt') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/lsarmento/xbeach/xbtools_test\\XBlog.txt'
Looking at the source code of the class, it seems it may be related with this line:
with open(self.model_path+'\\XBlog.txt') as file:
which I believe is not capable of handling non-windows paths.
Potential fix: use os.path.join instead of string concatenation:
with open(os.path.join(self.model_path,'XBlog.txt')) as file:
The text was updated successfully, but these errors were encountered:
I have just installed xbTools, and I am facing an issue that may be related with Windows vs osX path definitions.
My script is:
The result from:
is:
Looking at the source code of the class, it seems it may be related with this line:
which I believe is not capable of handling non-windows paths.
Potential fix: use os.path.join instead of string concatenation:
The text was updated successfully, but these errors were encountered: