Skip to content
This repository was archived by the owner on Nov 4, 2020. It is now read-only.

cant run two times same "cell" when py opencv opens a imshow #118

Open
tyoc213 opened this issue Apr 16, 2018 · 2 comments
Open

cant run two times same "cell" when py opencv opens a imshow #118

tyoc213 opened this issue Apr 16, 2018 · 2 comments

Comments

@tyoc213
Copy link

tyoc213 commented Apr 16, 2018

Environment data

VS Code version: 1.22.1
Jupyter Extension version: 1.1.4
OS and version: Linux one 4.13.0-38-generic #43-Ubuntu SMP Wed Mar 14 15:20:44 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Logs

Output from Jupyter output panel

---------------------------------------------------------------------------
error                                     Traceback (most recent call last)
<ipython-input-25-661d1ef45612> in <module>()
      8 print(img)
      9 
---> 10 cv2.imshow('imagen', img)
     11 cv2.waitKey(0)
     12 cv2.destroyAllWindows()

error: /tmp/build/80754af9/opencv_1512491966560/work/modules/highgui/src/window.cpp:611: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage

Output from Console window (Help->Developer Tools menu)

[Extension Host] Timeout
webview.ts:128 [Embedded Page] reloaded results window at time 1523856572333ms
4webview.ts:128 [Embedded Page] [object Object]

Actual behavior

Shows the error

Expected behavior

It should display the cv2 image...

Steps to reproduce:

import numpy as np
import cv2

img = cv2.imread("009713.jpg", 0)
print(img)

cv2.imshow('imagen', img)
cv2.waitKey(0)
@tyoc213
Copy link
Author

tyoc213 commented Apr 16, 2018

Sorry it was my error... or one about how is opencv installed on ubuntu, I solved it with https://stackoverflow.com/a/49018788/682603 which updated/changed a lot of packages, but it is working now.

@tyoc213 tyoc213 closed this as completed Apr 16, 2018
@tyoc213
Copy link
Author

tyoc213 commented Apr 16, 2018

well, it seems that I can show the image, but I cant run 2 times the "cell", so, I will open the issue again and change the title to "cant run the same cell two times when showing an opencv image
1523864294421.log here is the saved log
"

@tyoc213 tyoc213 reopened this Apr 16, 2018
@tyoc213 tyoc213 changed the title cant display py opencv images cant run two times same "cell" when py opencv opens a imshow Apr 16, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant