Python Forum
NameError: name 'self' is not defined
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NameError: name 'self' is not defined
#14
Yes many different .tif where tried.

I changed this line:
self.img = cv2.cvtColor(frame, cv2.COLOR_BGR2RGB)
with this line (that seems to work on a code without loading button)

self.img = cv2.imdecode(np.fromfile(frame, dtype=np.uint8), cv2.IMREAD_UNCHANGED)
but I get this error:

Error:
self.img = cv2.imdecode(np.fromfile(frame, dtype=np.uint8), cv2.IMREAD_UNCHANGED) AttributeError: 'numpy.ndarray' object has no attribute 'flush'
I am trying with hours of google searching to figure out how to fix it...! Any ideas?

update: Ok, I will take a look. Thanks!!
(I posted the question and then I saw your last post with OrthoViewLite).
Reply


Messages In This Thread
NameError: name 'self' is not defined - by hobbyist - Jan-03-2021, 05:31 PM
RE: NameError: name 'self' is not defined - by hobbyist - Jan-05-2021, 09:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Kivy] NameError: name 'App' is not defined nengkya 4 13,770 Apr-02-2017, 07:15 PM
Last Post: metulburr
  [WxPython] NameError: global name 'PyAssertionError' is not defined merlem 5 6,404 Jan-28-2017, 01:59 PM
Last Post: merlem

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020