I am just following the tutorial, but why is the result different?
I don’t know why it’s not working, while my teacher can do it. I’ve searched through ChatGPT and others, but still couldn’t find a solution. I just want my program to run.
I am just following the tutorial, but why is the result different?
I don’t know why it’s not working, while my teacher can do it. I’ve searched through ChatGPT and others, but still couldn’t find a solution. I just want my program to run.
2
Answers
You can use
print
, it will print since it’s just a warning.The warning said you shouldn’t use
print()
in production code.print()
will print logs in release builds as well, which is something that shouldn’t happen as some developers might log sensitive information.You can get rid of the warning with below solution:
Open analysis_options.yaml file and add this linter rule:
That’s not a good practice to use
print()
in production code.Instead you can try using logger package, that is also a lot comfortable to use.