Bash failing, no subprocess.run() error

I’m having trouble getting Bash to work in the claude code challenge step #0Q5, on python.

First I tried the command suggested in the instructions:

result = subprocess.run(command, capture_output=True, text=True)

but got an error: module ‘asyncio.subprocess’ has no attribute ‘run’.

Googling suggested this is a python 3.7 vs <=3.6 issue?

So to be 3.6-compatible, I went with loop=asyncio.get_event_loop(), but got this error: There is no current event loop in thread ‘MainThread’.

Then I updated to new_event_loop(), but codecrafters has been “running tests” for 10-15 minutes now… and I think it may be frozen and I’m not sure how to force-close?

Thanks!

Hey @ChristoBeers, could you upload your code to GitHub and share the link? It will be much easier to debug if I can run it directly.

Thanks Andy, my trial period ended so I’m pivoting to build my actual project. It was fun working on the challenge too bad I didnt get to finish it.

@ChristoBeers Would you mind clarifying what you mean by “trial period”? The Claude Code challenge is currently still in beta, so it’s available to try for free.

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.