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
Try to get the yaml header of a weldx file and got an exception:
new_asdf_file=asdf.open("vgroove.asdf")
yaml_header=weldx.asdf.util.get_yaml_header(new_asdf_file)
# Exception has occurred: TypeError# expected str, bytes or os.PathLike object, not AsdfFile# File "D:\Documents\dev\python\kisa-weldx-examples\asdf_file_handling.py", line 26, in <module># yaml_header = weldx.asdf.util.get_yaml_header(new_asdf_file)
weldx version = 0.3.1
Python 3.8.8 (default, Feb 24 2021, 15:54:32) [MSC v.1928 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
according to the documentation you should pass a file name to the get_header function. This makes sense, because the asdf.open() function already reads in all the meta-data and runs validation and so forth (e.g. creates a heavy-weight object).
edit: funnily the wrapped google result does not point to the readthedocs result I get without the wrapper. They must know me very well. Sorry for playing the wise guy here!
Try to get the yaml header of a weldx file and got an exception:
weldx version = 0.3.1
Python 3.8.8 (default, Feb 24 2021, 15:54:32) [MSC v.1928 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
See the full example under:
kisa-weldx-examples/asdf_file_handling.py
The text was updated successfully, but these errors were encountered: