« first day (5046 days earlier)      last day (41 days later) » 

10:40 AM
@paul23 Typing level abstraction you are looking for would be just a "collection", I think
Collection doesn't have a size though :/
11:07 AM
replying to this after like 2-3 months but remembered that you needed some parser in Python. Well, not aiding your problem, just wondering how classically a parser is written in Python.
I had a project now where I wrote a pipeline that's basically ran with a function that takes the input arguments and runs the pipeline accordingly, but near the end my boss asked me to make it able to run it from command line. So I created a parser() function which is run at the top of my __main__ function:
A,B,C,kwargs = parser()
11:22 AM
My program is hanging somewhere and I can't figure out where or why. Is there a way to find out which line of code each asyncio Task is currently executing?
 
2 hours later…
1:00 PM
The good news is that I discovered the Task.get_stack function, the bad news is that
> The ordering of the returned list differs depending on whether a stack or a traceback is returned: the newest frames of a stack are returned, but the oldest frames of a traceback are returned.
1:41 PM
@me9hanics argument parsing and parsing JavaScript are two very different beasts. help="..." shows when you call the program with --help. Use if __name__ == "__main__" for the CLI entrypoint. Or use a setuptools entrypoint which points to the same main() as the if __name__ == "__main__".
2
 
3 hours later…
4:46 PM
@VLAZ fancy seeing you here :) this is rare
@me9hanics @Peilonrayz said it better than I would, parsing js and args is very different, but I appreciate the thought of pinging me about it :)
@NordineLotfi It would be yes, because I don't know Python :P I signed up for an intro course in it, though, so that should change in the future.
nice! I wish I was there to help when you came. gotten a bit busy so don't come as often on SO/SE
5:16 PM
@Aran-Fey can the threads not take an ID at the time they are spawned?
And by that I mean literally an argument ID from enumerate vs. some kind of system ID
They can, but how does that help me figure out where it's stuck?
Lots and lots of print statements :/ But at least you'd be able to differentiate specific inputs to the threads and find the line that is hanging
It turned out that the problem is that a task isn't running, but for some reason it's still in my running_tasks set
5:57 PM
I'm curious on how you found that out because I really would just be dumping CSVs left, right and centre and going through them manually to work out what went to what thread and which was actually processing stuff
(Not that I think threads speed up processing, just that I'd have input/output, or lack thereof, CSVs everywhere here)
Well, I added a bunch of prints to my decide_if_this_download_can_be_started_now function, which gave me the output "1 download is currently running, the limit is set to 1, so the answer is no", and then when I called print_stack() on it, it said "There's no stack to print, the task is already done"
6:16 PM
OK, thanks, I don't feel too far behind the debugging curve here :)

« first day (5046 days earlier)      last day (41 days later) »