Thanks!
Sounds very helpful, but indeed something very strange happens between replit and openCV.
I have downloaded (forked? not sure if that’s the right word) as suggested the template (and named it POTATOCOUNT3), and the example provided works well.
However when i replace the provided code with my own script i get a frightening Qt error.
My URL: main.py - POTATOCOUNT3 - Replit
MY SCRIPT
import cv2 as cv
# Load the image
image_path = 'IMAGEPATATE.jpg'
image = cv.imread(image_path)
# Convert the image to grayscale
gray = cv.cvtColor(image, cv.COLOR_BGR2GRAY)
# Show the grayscale image
cv.imshow('Grayscale Image', gray)
cv.waitKey(0)
cv.destroyAllWindows()
MY TRACEBACK
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/runner/POTATOCOUNT3/venv/lib/python3.8/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
SIGABRT: abort
PC=0x7fb3d24adbaa m=0 sigcode=18446744073709551610
signal arrived during cgo execution
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4dded0, 0xc000068cf0, 0x4111d8)
runtime/cgocall.go:154 +0x5b fp=0xc000068cc0 sp=0xc000068c88 pc=0x406bfb
main._Cfunc_pry_eval_file(0x555556d60750, 0x555556d26a00, 0x1, 0x555556d78900, 0xc000000000)
_cgo_gotypes.go:562 +0x48 fp=0xc000068cf0 sp=0xc000068cc0 pc=0x4db848
main.Python.EvalFile.func5(0x555556d60750, 0x555556d26a00, 0xc0000c6170, 0x0, 0x0, 0x555556d78900, 0x0)
github.com/replit/prybar/languages/python3/main.go:92 +0x6d fp=0xc000068d28 sp=0xc000068cf0 pc=0x4dd1ad
main.Python.EvalFile(0x7fff6e506b8e, 0x7, 0xc0000c6170, 0x0, 0x0, 0x0)
github.com/replit/prybar/languages/python3/main.go:92 +0x275 fp=0xc000068de8 sp=0xc000068d28 pc=0x4dc475
main.(*Python).EvalFile(0x605980, 0x7fff6e506b8e, 0x7, 0xc0000c6170, 0x0, 0x0, 0xc0000ad110)
<autogenerated>:1 +0x65 fp=0xc000068e28 sp=0xc000068de8 pc=0x4dda25
github.com/replit/prybar/utils.Language.EvalFile(0x53b5a8, 0x605980, 0x7fff6e506b78, 0x12, 0x7fff6e506b8e, 0x7, 0xc0000c6170, 0x0, 0x0, 0x43d1e5)
github.com/replit/prybar/utils/language.go:86 +0x9e fp=0xc000068e80 sp=0xc000068e28 pc=0x4da21e
github.com/replit/prybar/utils.DoCli(0x53b5a8, 0x605980)
github.com/replit/prybar/utils/utils.go:67 +0x3c5 fp=0xc000068f68 sp=0xc000068e80 pc=0x4daca5
main.main()
github.com/replit/prybar/languages/python3/generated_launch.go:7 +0x39 fp=0xc000068f88 sp=0xc000068f68 pc=0x4db059
runtime.main()
runtime/proc.go:225 +0x256 fp=0xc000068fe0 sp=0xc000068f88 pc=0x439c16
runtime.goexit()
runtime/asm_amd64.s:1371 +0x1 fp=0xc000068fe8 sp=0xc000068fe0 pc=0x46b981
rax 0x0
rbx 0x6
rcx 0x7fb3d24adbaa
rdx 0x0
rdi 0x2
rsi 0x7fff6e504360
rbp 0x7fff6e5045a0
rsp 0x7fff6e5043d8
r8 0x0
r9 0x7fff6e504360
r10 0x8
r11 0x246
r12 0x555557218808
r13 0x7fff6e504770
r14 0x7fff6e504708
r15 0x7fff6e504778
rip 0x7fb3d24adbaa
rflags 0x246
cs 0x33
fs 0x0
gs 0x0
repl process died unexpectedly: exit status 2