getShortServerName throwing up MissingMethodException error in QuPath

I am new to QuPath. I need to get the current image name and was following tutorials that list the steps as below. The first two line works and returns the expected output. However the last step gave me the MissingMethodException error that suggests the method “getShortServerName” is somehow missing. Can anyone help me with this problem? I am running QuPath 0.2.3 on MacOS Catalina 10.15.6.

def imageData = QPEx.getCurrentImageData()
def server = imageData.getServer()
def name = server.getShortServerName()

I think getShortServerName() was removed in the 0.2.0 versions. Can you work with

getProjectEntry().getImageName()
2 Likes

Thank you for your quick reply, this works! Also, I have a lot of questions about some of the QuPath command. Is there any API that document the commands currently in use?

1 Like

Aside from what is listed in the readthedocs site, and looking in the code in areas like qpex, Pete often recommends using the describe() function on objects you want to know more about.
I keep a list of “stuff” that is frequently out of date, though mostly indicates which version it will work in here, but it is by no means official.
https://gist.github.com/Svidro

Can also see some other sources of coding information here:


But the best place will generally be the readthedocs site.

1 Like

Thank you for your help. Much appreciated!

1 Like