#π Issue with a function who return a list empty
18 messages Β· Page 1 of 1 (latest)
@heady glacier
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
i see that you have some print statements you've been using for debugging, what do they tell you?
they return me that the fonction is use but nothing get inside of it
i've also made a print statement to see what i get at the very end in the list and the list is empty
so you get
for pid, info in proc info end used
but you never get
for pid, info in proc info end; if used
the list appending is inside the if-statement, so it's necessary that the if-condition is true at least once, otherwise your list will be empty
so you'll want to debug get_proc_info, find out why it apparently either A) gives empty dicts, or B) never contains anything that passes the if-condition
ok i'm looking for that, keep you on juice
i don't understand how but i don't get the
for pid, info in proc_info_end.items()```
anymore
and my damn computer had no more power left so i guess it's gonna be for tomorow, still thanks for you'r help @inland mica
if the dicts are empty what should i do ?
depends on what's wrong, gotta debug to find out
okay, i shall be able to do that tomorow ig
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.