We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I messed something up in #4917
openstudio.Path is not accepted anymore in python bindings.
In [1]: from pathlib import Path In [2]: import openstudio In [4]: m = openstudio.model.Model() In [5]: m.save('model.osm', True) Out[5]: True In [6]: m.save(Path('model.osm'), True) Out[6]: True In [7]: m.save(openstudio.toPath('model.osm'), True) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In[7], line 1 ----> 1 m.save(openstudio.toPath('model.osm'), True) File ~/Virtualenvs/py39/lib/python3.9/site-packages/openstudio/openstudioutilitiesidf.py:1997, in Workspace.save(self, p, overwrite) 1996 def save(self, p, overwrite=False): -> 1997 return _openstudioutilitiesidf.Workspace_save(self, p, overwrite) TypeError: Wrong number or type of arguments for overloaded function 'Workspace_save'. Possible C/C++ prototypes are: openstudio::Workspace::save(openstudio::path const &,bool) openstudio::Workspace::save(openstudio::path const &)
Some additional details about your environment for this issue (if relevant):
https://unmethours.com/question/98612/why-does-modelsavepath-fail-with-path-an-openstudiopath/
The text was updated successfully, but these errors were encountered:
#5133 - Add a failing test
1f0d8cf
Fix #5133 - I messed up the typecheck
7bf9793
Technically speaking, the typecheck is pointless, but whatever... typecheck is used for overloading
Merge pull request #5170 from NREL/5133_toPath_python
ae6cba2
Fix #5133 - Conversion to/from pathlib.Path in python bindings now rejects openstudio.Path
jmarrec
Successfully merging a pull request may close this issue.
Issue overview
I messed something up in #4917
Current Behavior
openstudio.Path is not accepted anymore in python bindings.
Expected Behavior
Steps to Reproduce
Possible Solution
Details
Environment
Some additional details about your environment for this issue (if relevant):
Context
https://unmethours.com/question/98612/why-does-modelsavepath-fail-with-path-an-openstudiopath/
The text was updated successfully, but these errors were encountered: