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.

Log Monitor TypeError

See original GitHub issue

No reproducible script (never seen this before), but this happened in the middle of my training:

2020-12-02 07:26:37,751	WARNING worker.py:1011 -- The log monitor on node ip-172-31-18-179 failed with the following error:
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/ray/log_monitor.py", line 354, in <module>
    log_monitor.run()
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/ray/log_monitor.py", line 275, in run
    self.open_closed_files()
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/ray/log_monitor.py", line 164, in open_closed_files
    self.close_all_files()
  File "/home/ubuntu/anaconda3/lib/python3.7/site-packages/ray/log_monitor.py", line 102, in close_all_files
    os.kill(file_info.worker_pid, 0)
TypeError: an integer is required (got type str)

cc @rkooo567

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:32 (28 by maintainers)

github_iconTop GitHub Comments

2reactions
FarzanTcommented, Feb 22, 2021

@rkooo567 Great, so the only thing required is to add "autoscaler" here?

if (file_info.worker_pid != "raylet"
        and file_info.worker_pid != "gcs_server" and file_info.worker_pid != "autoscaler"):
    os.kill(file_info.worker_pid, 0)

I can submit a pull request, I would like to practice!

2reactions
wuisawesomecommented, Feb 22, 2021

Does anyone have a repro? If this was happening in december, then “autoscaler” was probably not the string breaking this.

Alternatively we could just do

try:
    os.kill(int(file_info.worker_pid), 0)
catch ...
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Catch (and Fix) JavaScript TypeErrors - Rollbar
Looking at a list of TypeErrors in your logs makes it difficult to decide if it is one problem materializing in different forms...
Read more >
How to Collect, Customize, and Centralize Python Logs
Learn how to use these Python logging best practices to debug and optimize your ... For instance, if your application encounters a TypeError...
Read more >
Issue with whitespace in event log name - Forum
I'm trying to setup an event log monitor for a Symantec Enterprise Vault Server, to alert on a few critical error messages. Unfortunately...
Read more >
Exceptional Logging of Exceptions in Python - Loggly
Aaron Maxwell shares 6 Python exception logging patterns that show why logging is one of developers' most powerful tools for dealing with ...
Read more >
Type Errors - learn how to fix these - Codecademy
TypeError related to console.log() ... Error message: ... What has gone wrong? You have changed console.log() from a function into a string or...
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