zed icon indicating copy to clipboard operation
zed copied to clipboard

Failed to load image: Invalid symbol 10, offset 19812.

Open srt7509 opened this issue 1 year ago • 2 comments

Check for existing issues

  • [ ] Completed

Describe the bug / provide steps to reproduce it

It shows "Failed to load image: Invalid symbol 10, offset 19812." after I run a python program with plotting function using Zed REPL. By the way, the results are all correct except no pictures showed. 截屏2024-08-16 11 05 30

Environment

Mac OS 13.6 , Miniconda Python 3.9

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Zed.log

2024-08-16T10:55:29.359898+08:00 [INFO] kernel: NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
2024-08-16T10:55:29.360055+08:00 [INFO] kernel: 
2024-08-16T10:55:29.360175+08:00 [INFO] kernel: To exit, you will have to explicitly quit this process, by either sending
2024-08-16T10:55:29.360298+08:00 [INFO] kernel: "quit" from a client, or using Ctrl-\ in UNIX-like environments.
2024-08-16T10:55:29.360422+08:00 [INFO] kernel: 
2024-08-16T10:55:29.36054+08:00 [INFO] kernel: To read more about this, see https://github.com/ipython/ipython/issues/2049
2024-08-16T10:55:29.360664+08:00 [INFO] kernel: 
2024-08-16T10:55:29.360782+08:00 [INFO] kernel: 
2024-08-16T10:55:29.360901+08:00 [INFO] kernel: To connect another client to this kernel, use:
2024-08-16T10:55:29.361024+08:00 [INFO] kernel:     --existing kernel-zed-30064771095.json

srt7509 avatar Aug 16 '24 03:08 srt7509

Can you please paste your Zed version info into the issue description? cmd-shift-p and copy specs to clipboard

notpeter avatar Aug 22 '24 19:08 notpeter

If that error is coming up, the image crate was unable to render it. If you can reliably run that same block again with that error, it might be helpful for us to see your matplotlibrc because I haven't been able to reproduce with your code.


When I ran the code it produced a valid image though I don't have the font:

image

If I switch to Arial Unicode MS I get:

image

rgbkrk avatar Aug 23 '24 02:08 rgbkrk

Can you please paste your Zed version info into the issue description? cmd-shift-p and copy specs to clipboard

Thanks a lot,I used Ver. 0.148.1 for learning last week, I will try it again using the latest version.

srt7509 avatar Aug 28 '24 14:08 srt7509

If that error is coming up, the image crate was unable to render it. If you can reliably run that same block again with that error, it might be helpful for us to see your matplotlibrc because I haven't been able to reproduce with your code.

When I ran the code it produced a valid image though I don't have the font:

image

If I switch to Arial Unicode MS I get:

image

Thanks. The font problems in my code was showed up when I used other editor , such as VSC, Sublime. So I guess that is not the reason. I will using the latest version Zed and test again.

srt7509 avatar Aug 28 '24 14:08 srt7509

Sorry, the bug came again. I use Zed Preview 0.151.1 for Mac (Intel).

Zed: v0.151.1 (Zed Preview) OS: macOS 13.6.0 Memory: 16 GiB Architecture: x86_64

image

My code:

import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np

x = np.random.randint(low=2, high=10, size=10) y = np.random.randint(low=2, high=10, size=10) plt.scatter(x, y)
plt.title("hi") plt.xlabel("x") plt.ylabel("y") plt.show()

srt7509 avatar Sep 02 '24 16:09 srt7509

I have a similar error in:

  • #18086

cthed2 avatar Sep 19 '24 16:09 cthed2

@cthed2 Reported a similar error in dev (0.154.x) in #18086. Reopening here, hopefully we can find some reproduction steps.

The R code executes fine, I can't view images generated by ggplot2. Instead, I receive the following error message.

Failed to load image: Invalid symbol 10, offset 72

image

2024-09-19T11:07:07.461096-05:00 [ERROR] Error { code: HRESULT(0x80070490), message: "No se ha encontrado el elemento." }

Settings:

"jupyter": {
  "kernel_selections": {
    "r": "ark"
  }
}

notpeter avatar Sep 19 '24 20:09 notpeter

The error still shows up in Zed Preview 0.156.0, hope you guys can fix it .

srt7509 avatar Oct 05 '24 09:10 srt7509

I'm also having a similar problem with Zed preview 0.156.1

jamesacodgers avatar Oct 14 '24 10:10 jamesacodgers

I am also having the same issue with Zed 0.157.5

SweetestRug avatar Oct 22 '24 12:10 SweetestRug