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
>>> import pyromat as pm
>>> O2 = pm.get('ig.O2')
>>> h = O2.h(492,1.01) # enthalpy at 492K, 1.01bar
>>> pm.info('O2') # where did these data come from?
>>> pm.config['unit_pressure'] = 'psi' # Don't like working in bar?
However, attempting the info() function with pyromat 2.2.1, I get an error:
PM ERR: No substanced named "O2" was found in the loaded data.
---------------------------------------------------------------------------
PMParamError Traceback (most recent call last)
Input In [19], in <cell line: 1>()
----> 1 pm.info('O2')
File ~/miniconda3/envs/romat/lib/python3.9/site-packages/pyromat/__init__.py:275, in info(members, target, **kwarg)
273 members = [members]
274 elif isinstance(members, str):
--> 275 members = [get(members)]
277 # If operating verbosely, we'll need to print to stdout
278 if target is None:
File ~/miniconda3/envs/romat/lib/python3.9/site-packages/pyromat/__init__.py:81, in get(idstr)
79 if out is None:
80 utility.print_error('No substanced named "' + str(idstr) + '" was found in the loaded data.')
---> 81 raise utility.PMParamError('Invalid substance ID string')
82 return out
PMParamError: Invalid substance ID string
This is resolved if the phase is included (i.e. by running pm.info("ig.O2")).
Please change the README to reflect proper usage of the info() function, or else change info() to enable functionality without specifying phase information.
The text was updated successfully, but these errors were encountered:
espottesmith
changed the title
Example for pyromat.info() in docs does not work
[Review] Example for pyromat.info() in docs does not work
Sep 22, 2022
In the README, the following example is given:
However, attempting the info() function with pyromat 2.2.1, I get an error:
This is resolved if the phase is included (i.e. by running
pm.info("ig.O2")
).Please change the README to reflect proper usage of the info() function, or else change info() to enable functionality without specifying phase information.
The text was updated successfully, but these errors were encountered: