How do I access the value of an object attribute that displays in angle brackets like: <attribute 'version' of 'Metashape.Metashape.Application' objects>?
Specifically, I am using the Metashape Python module and run the following lines within an interactive Python session:
import Metashape
a = Metashape.Application
a.version
and this is when I get
<attribute 'version' of 'Metashape.Metashape.Application' objects>
I've tried print(a.version) and get the same output.
According to the module reference doc, this attribute should be a string, so I'm confused why it can't just be displayed as a string.
According to the docs:
An instance of Application object can be accessed using Metashape.app attribute, so there is usually no need to create additional instances in the user code.
so...
import Metashape
print(Metashape.app.version)
If you want to do it your way, you need to instance Application.
import Metashape
app = Metashape.Application()
print(app.version)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With