ksugar / qupath-extension-sam

QuPath extension for Segment Anything Model (SAM)
GNU General Public License v3.0
91 stars 13 forks source link

Connection failed error #15

Open Faezeqp opened 8 months ago

Faezeqp commented 8 months ago

@ksugar thanks for developing this extension in qupath I am new Qupath and just started using it for my analysis. SAM extension would be really helpful for me and saves me a good amount of time. I tried to install the server an I guess it was successful: "INFO: Started server process [30464] INFO: Waiting for application startup. INFO: Application startup complete. INFO: Started server process [28072] INFO: Waiting for application startup. INFO: Application startup complete."

However, when I run extension in qupath, it keeps giving me an error of connection failed.

I also get this error in the log: "13:07:26.658 [JavaFX Application Thread] WARN org.elephant.sam.commands.SAMMainCommand Task failed: org.elephant.sam.tasks.SAMFetchWeightsTask@43c60e60[Completed exceptionally: java.lang.IllegalArgumentException: Illegal character in scheme name at index 0: http://localhost:8000/sam/weights/?type=vit_l] java.lang.IllegalArgumentException: Illegal character in scheme name at index 0: http://localhost:8000/sam/weights/?type=vit_l at java.base/java.net.URI.create(Unknown Source) at org.elephant.sam.tasks.SAMFetchWeightsTask.sendRequest(SAMFetchWeightsTask.java:79) at org.elephant.sam.tasks.SAMFetchWeightsTask.getWeights(SAMFetchWeightsTask.java:62) at org.elephant.sam.tasks.SAMFetchWeightsTask.call(SAMFetchWeightsTask.java:49) at org.elephant.sam.tasks.SAMFetchWeightsTask.call(SAMFetchWeightsTask.java:30) at javafx.concurrent.Task$TaskCallable.call(Task.java:1426) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.net.URISyntaxException: Illegal character in scheme name at index 0: http://localhost:8000/sam/weights/?type=vit_l at java.base/java.net.URI$Parser.fail(Unknown Source) at java.base/java.net.URI$Parser.checkChars(Unknown Source) at java.base/java.net.URI$Parser.checkChar(Unknown Source) at java.base/java.net.URI$Parser.parse(Unknown Source) at java.base/java.net.URI.(Unknown Source) ... 12 more"

I'm not familiar with coding, but I really want this extension to work.

ksugar commented 8 months ago

@Faezeqp Thank you for trying this extension and reporting the issue.

The error message indicates that there is an unexpected character at the beginning of the URL. Please check that you don't have any white spaces or other characters beforehttp://localhost:8000/sam/.

Faezeqp commented 8 months ago

@ksugar thanks for replying. I checked and the URL was right. I gave it more time and the server started to connect. It is working now!