Open kasia129 opened 5 months ago
I think this issue has been fixed in the current state of the dev branch: https://github.com/NREL/MoorPy/blob/6ffdc85854f7077c3174175fe5c809cfb3028b59/moorpy/helpers.py#L658
Does updating with the latest commits solve the issue?
This version still shows the same code, I think. The issue I had in mind was about the if not lineProps==None and not source==None
rather than if lineProps==None and source==None
. I might be missing something here, but I thought these lines:
if not source==None:
lineProps = loadLineProps(source)
if not lineProps==None:
print('Warning: both lineProps and source arguments were passed to getLineProps. lineProps will be ignored.')
do:
It could be that loading the moor props from source returns None, but since in loadLineProps() output is initialised as an empty dict, I would think that cannot be the case?
Description
On dev branch, in getLineProps function of helpers.py lines 622-665, there is a check for having both the source and lineProps arguments not None, but it is only done after assigning the inputs from the yaml file to the lineProps variable, so the
if not lineProps==None
statement can never be False.Current behavior
Warning: both lineProps and source arguments were passed to getLineProps. lineProps will be ignored is always printed out if source is not None, regardless of the lineProps argument.