There is a problem coding with Python. TypeError: '<=' not supported between instances of 'int' and 'NoneType'

Asked 6 days ago, Updated 6 days ago, 1 views

I coded the image brightness adjustment, but when I run it,

You get an error like this.

I would appreciate it if you could tell me how to solve this problem.

python typeerror

2022-09-20 14:57

1 Answers

If you read the error message carefully, there is an answer.

The code indicated by the error is

if (0 <= pix) or (pix <= r1):

Here, 0 <= fix is what the error points to, or fix <= r1.

In conclusion, when debugging , do not look at the error message roughly, but make sure to interpret it well and carefully.


2022-09-20 14:57

If you have any answers or tips


© 2022 pinfo. All rights reserved.