Closed alexx-km closed 2 months ago
Hi @alexx-km, thank you for reporting the issue. I happened to notice the same problem with CHW images yesterday and already submitted a fix to the JetBrains marketplace. If you can't wait for it to be approved, you can already manually install the 0.2.1 update by downloading the artifact here (very bottom of the page) and then following the installation instructions.
Regarding the second issue with viewing slices of a tensor, I can reproduce the problem and will work on a fix soon!
BTW: Sorry about the spam comments. I don't know why they are targeting this repo.
Hi @srwi, thank you for the swift reply! Sounds great, I'm looking forward to the fix.
Version 0.2.1 was approved and fixes both the dimension order and slicing problem. Would it be possible for you to confirm that?
Just tested the new version and it worked flawlessly. Thank you so much!
Hey @srwi , when I try to visualize tensors / numpy arrays on the newest PyCharm version, I get the following error
Unexpected JSON token at offset 2304: Expected quotation mark '"', but had 'EOF' instead at path: $.data
JSON input: .....vb2WT729gYICvkwq4b1zoKC70mCFPZ
kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:24)
kotlinx.serialization.json.internal.JsonExceptionsKt.JsonDecodingException(JsonExceptions.kt:32)
kotlinx.serialization.json.internal.AbstractJsonLexer.fail(AbstractJsonLexer.kt:580)
kotlinx.serialization.json.internal.AbstractJsonLexer.fail$default(AbstractJsonLexer.kt:578)
kotlinx.serialization.json.internal.AbstractJsonLexer.fail$kotlinx_serialization_json(AbstractJsonLexer.kt:231)
kotlinx.serialization.json.internal.StringJsonLexer.consumeKeyString(StringJsonLexer.kt:95)
kotlinx.serialization.json.internal.AbstractJsonLexer.consumeString(AbstractJsonLexer.kt:365)
kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeString(StreamingJsonDecoder.kt:339)
com.github.srwi.pixellens.data.Base64ByteArraySerializer.deserialize(BatchDataPayload.kt:21)
com.github.srwi.pixellens.data.Base64ByteArraySerializer.deserialize(BatchDataPayload.kt:12)
kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableValue(AbstractDecoder.kt:43)
kotlinx.serialization.encoding.AbstractDecoder.decodeSerializableElement(AbstractDecoder.kt:70)
kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableElement(StreamingJsonDecoder.kt:168)
com.github.srwi.pixellens.data.BatchDataPayload$$serializer.deserialize(BatchDataPayload.kt:26)
com.github.srwi.pixellens.data.BatchDataPayload$$serializer.deserialize(BatchDataPayload.kt:26)
kotlinx.serialization.json.internal.StreamingJsonDecoder.decodeSerializableValue(StreamingJsonDecoder.kt:69)
kotlinx.serialization.json.Json.decodeFromString(Json.kt:165)
com.github.srwi.pixellens.imageProviders.ImageProvider.getBatchData(ImageProvider.kt:283)
com.github.srwi.pixellens.imageProviders.ImageProvider.getBatchByExpression(ImageProvider.kt:31)
com.github.srwi.pixellens.actions.ViewAsImageAction$actionPerformed$1.run(ViewAsImageAction.kt:28)
com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:477)
com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:528)
com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:49)
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:501)
com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:466)
com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
com.intellij.util.concurrency.ChildContext$runAsCoroutine$1.invoke(propagation.kt:92)
com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:97)
com.intellij.util.concurrency.ChildContext.runAsCoroutine(propagation.kt:92)
com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:464)
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:735)
java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:732)
java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:732)
java.base/java.lang.Thread.run(Thread.java:1583)
Do you already know about this issue?
Hi @alexx-km, did it only start with the 2024.2.1 update of PyCharm or with the 0.2.2 update of PixelLens? Does it happen every time or randomly?
Unfortunately I wasn't able to reproduce it yet.
I think it started with the update to 2024.2.1 and happens every time I try to open an image using remote (ssh) debugging. Is there any way to furthernhelp you debug this problem?
Have the same problem and it started with 2024.2.1. I went back to 2024.2.0.1 and it worked again. It looks like also another Visualization Plugin (https://plugins.jetbrains.com/plugin/14371-debug-image-viewer-former-opencv-image-viewer-) is affected by the same problem. The Problem was already existing when using Version 0.2.1 of PixelLens
Thanks for the additional information. I'll dig into it further this evening.
It looks like it's this bug in PyCharm: https://youtrack.jetbrains.com/issue/PY-75568/Large-strings-truncated-when-displayed-in-debug-output-or-evaluate-windows-again
I can fix the issue by reducing the data transmission buffer size to 256 bytes (from 2.000.000 bytes) but that significantly slows down the transmission. I'll try to find a more elegant solution. Hopefully they'll fix the bug soon as it's quite a significant one.
I went the easy route and applied that workaround only for the affected PyCharm version. It will be available in 0.2.3 once it's approved, but you should probably just skip the 2024.2.1 entirely until the PyCharm bug is fixed.
Thank you for being so quick about reporting the problem!
also thanks very much for taking care about that problem that quickly ;-)
An exception occurred in the plugin.
Environment:
Exception details:
Steps to reproduce:
The first time I tried to view this image it worked, but it was visualized wrong (just six black lines) as it had the shape torch.Size([1, 1, 6, 3, 480, 800]). After I tried to directly access the batch with img[0][0] in "Evaluate Expression", the error occured.
If you have any further questions, please feel free to ask. I'd be glad to help!