question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unnecessary print statements in code

See original GitHub issue
  • Using latest version as provided on the master branch
  • Searched for similar issues including closed ones

What is the purpose of your issue?

  • Bug
  • Feature Request
  • Question
  • Other

Description

There are two unnecessary print statements in the code, in spotdl.py lines 82 and 162.

Log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ritiekcommented, Sep 26, 2018

I wouldn’t want to remove them either. As @linusg mentioned they indeed help in making events easy to notice. We could remove the prefix by creating a new logger (logzero.setup_logger) without a prefix but IMO that would be too much just for showing blank lines in the console.

I am also not sure if we should have these print statements carry over to log file, I don’t have any strong preference on this though.

pafy as a library seems to use a few too, like here: https://github.com/mps-youtube/pafy/blob/7c3150394a074002749e1d982334d0597911cb29/pafy/backend_youtube_dl.py#L182

0reactions
arryoncommented, Sep 27, 2018

That’s fine 😃. The real culprit of my excessive prints turned out to be the progress bars from #375. I’ll retract my PR in this case.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - How can I fix unnecessary print statements from ...
The requirements want me to include a while loop in the code. I was thinking of changing it to while True: and putting...
Read more >
The Case Against Print Statements in your Main Branch
This blog post is not an argument against using print statements while you code. Print statements are invaluable when writing a feature or ......
Read more >
Is it a good habit to leave debugging 'print' lines in your codes?
No, it is never good practice to leave unnecessary code in your programs. Debugging print lines do not contribute to the operation of...
Read more >
unnecessary print statements throughout codebase & add ...
Many unnecessary fmt.Print*() have been found throughout code base. If this is for debugging, I believe a debugger could be used.
Read more >
The unreasonable effectiveness of print debugging
Using print statements, in contrast, forces you to formulate simple hypotheses and then verify or falsify them, e.g. "I think this variable in ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found