GithubHelp home page GithubHelp logo

Comments (11)

A1ines avatar A1ines commented on August 24, 2024 1

I cannot understand much from your report. Please paste your code and the full traceback message.

I encountered the same problem.
[Errno 2] No such file or directory: '/proc/1535931/stat'
After investigating,
I found that there are some anomalies with the /proc/1535931 directory. It doesn't contain the stat file, which causes the read error.
image
Since it runs on a server and I don't have permission to delete the anomalous process directory, I had to use a simple but effective method: skipping this PID.
image
Successfully run after modification.

from psutil.

giampaolo avatar giampaolo commented on August 24, 2024

I cannot understand much from your report. Please paste your code and the full traceback message.

from psutil.

IT-IvDragon avatar IT-IvDragon commented on August 24, 2024

you can in the function process_iter add try finally ,skip the pid when happen error。

image

from psutil.

giampaolo avatar giampaolo commented on August 24, 2024

Are you saying file /proc/1535931/stat does not exist but directory /proc/1535931 exists? If that's the case, what's the content of directory /proc/1535931?

from psutil.

IT-IvDragon avatar IT-IvDragon commented on August 24, 2024

yes ,I met the problem just not exist stat file, the other file/directory in directory /proc/1535931 is exist,I think is Linux system because of some special circumstances not create the stat Or the /proc/1535931 directory wasn't deleted

from psutil.

giampaolo avatar giampaolo commented on August 24, 2024

Can you do ls -la /proc/1535931 and paste the output?

from psutil.

IT-IvDragon avatar IT-IvDragon commented on August 24, 2024

I tried ls ,but cannot find the progress id ,just the /proc/1535931 dir

from psutil.

giampaolo avatar giampaolo commented on August 24, 2024

So the /proc/1535931 directory is empty?

from psutil.

IT-IvDragon avatar IT-IvDragon commented on August 24, 2024

not empty, there are some files, but no stat file

from psutil.

giampaolo avatar giampaolo commented on August 24, 2024

OK, paste those files. Paste the output of ls -la /proc/1535931 command.

from psutil.

IT-IvDragon avatar IT-IvDragon commented on August 24, 2024

@A1ines

from psutil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.