Openpmd-api: First Write Example - series.set_machine("str") is not working

Created on 8 Oct 2020  路  3Comments  路  Source: openPMD/openPMD-api

Describe the bug
When following the First Write example on openPMD (https://openpmd-api.readthedocs.io/en/0.12.0-alpha/usage/firstwrite.html ) via python / Jupyter
series.set_machine throws error (auto fill can't see the option)

To Reproduce
Compile-able/executable code example to reproduce the problem:

Python:

import openpmd_api as io
import numpy as np

series = io.Series("myOutput/data_001.h5", io.Access.create)

i = series.iterations[42]

series.set_author(
    "i Lomi <[email protected]>")
series.set_machine(                      #This is not working
    "Some Machine")
series.set_attribute(
    "Foot", "Schnitzel")
i.set_attribute(
    "hot", True)

Expected behavior

AttributeError: 'openpmd_api.openpmd_api_cxx.Series' object has no attribute 'set_machine'

Software Environment

  • version of openPMD-api: [0.12.0-api]
  • installed openPMD-api via: [conda-forge]
  • operating system: [Ubuntu 18.04.5 LTS]
  • machine: [Not a Public Cluster]
  • name and version of Python implementation: [Python 3.6.9]
  • version of HDF5: [e.g. 1.12.0]
  • version of ADIOS1: [ 1.13.1]
  • version of ADIOS2: [ 2.6.0 ]
  • name and version of MPI: [ (openMPI) 2.1.2 ]

Additional context
Add any other context about the problem here.
@PrometheusPi

affects latest release bug documentation Python3

Most helpful comment

Thanks for the report and proposed PR to expose this functionality in Python #796.
This indeed slipped, let's add this.

The temporary work-around for this is:

series.set_attribute("machine", "machine-site")

All 3 comments

I could reproduce this locally using 0.12.0-alpha and 0.8.0-alpha.

series.set_machine() appears to not exist.

Thanks for the report and proposed PR to expose this functionality in Python #796.
This indeed slipped, let's add this.

The temporary work-around for this is:

series.set_attribute("machine", "machine-site")

fixed with #796

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ax3l picture ax3l  路  4Comments

ax3l picture ax3l  路  3Comments

psychocoderHPC picture psychocoderHPC  路  3Comments

pordyna picture pordyna  路  5Comments

KseniaBastrakova picture KseniaBastrakova  路  4Comments