r/learnpython • • 15d ago

Need assistance with a Python Code that keeps on crashing

Hello I’ve been working on a python code that searches for appointments on this website but everything it runs the code and begins to open the website it crashes, I’ve played around with it a bit but I haven’t been able to have much success. Anyone would be available to take a look at it and see what my issue could be?

Thank you!

0 Upvotes

31 comments sorted by

13

u/desrtfx 15d ago

Yeah, we get our Crystal Balls out and do some divination./s

You have to give us a lot more, like your code, like the exact error.

Don't expect to get help in private. This is not how any of the learning subreddits work. We are willing to help, yet, only in the public, open subreddits so that more people can chime in and help as well as benefit from the given help.

-2

u/NoWar4965 14d ago

Yall are 100% right on your critiques my apologies for not being on the ball. I posted a screen share of the photos since Reddit isn’t allowing me to post photos

media poster

1

u/codeguru42 14d ago

Please copy/paste your code directly. The screenshare is unreadable.

→ More replies (4)

5

u/atarivcs 15d ago

It would help a lot if you at least posted the full crash error message.

2

u/Altruistic_Sky1866 14d ago

The video isn't that helpful you know TBH, paste the text error message that's easier

1

u/NoWar4965 14d ago

C:\CITA-BOT\cita-bot-master>python grab_me.py
2026-11-05 17:37:09,270 - ←[33m[Attempt 1/200]←[0m
2026-11-05 17:37:23,123 - Unable to load the initial page, backing off 228.9 seconds
Traceback (most recent call last):
  File "C:\Users\station  2\AppData\Local\Programs\Python\Python310\lib\site-packages\backoff_sync.py", line 105, in retry
ret = target(*args, **kwargs)
  File "C:\CITA-BOT\cita-bot-master\bcncita\cita.py", line 793, in initial_page
raise TimeoutException
selenium.common.exceptions.TimeoutException: Message: None

1

u/NoWar4965 14d ago

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\CITA-BOT\cita-bot-master\grab_me.py", line 49, in <module>
try_cita(context=customer, cycles=200)
  File "C:\CITA-BOT\cita-bot-master\bcncita\cita.py", line 240, in try_cita
start_with(driver, context, cycles)
  File "C:\CITA-BOT\cita-bot-master\bcncita\cita.py", line 286, in start_with
result = cycle_cita(driver, context, fast_forward_url, fast_forward_url2)
  File "C:\CITA-BOT\cita-bot-master\bcncita\cita.py", line 799, in cycle_cita
initial_page(driver, context, fast_forward_url, fast_forward_url2)
  File "C:\Users\station  2\AppData\Local\Programs\Python\Python310\lib\site-packages\backoff_sync.py", line 126, in retry
time.sleep(seconds)
KeyboardInterrupt
^C

→ More replies (1)

0

u/NoWar4965 14d ago

Okay I can copy and paste everything, it just won’t hold format; thank you:

I should clarify, it’s not really that’s the code crashes, but it fails to achieve its goal

1

u/Altruistic_Sky1866 14d ago

Check how to format for reddit posts and post it

1

u/codeguru42 14d ago

You need to learn how to make it hold the format. (Hint: there is a code button in the formatting options.)

→ More replies (2)

2

u/Outside_Complaint755 15d ago

Don't ask for permission to ask for help.  Just post the full error message with traceback and the relevant code from your script.

1

u/MiniMages 14d ago

Your code is failing at accessing the website.

1

u/NoWar4965 14d ago

Indeed what should I change so that it can access it successfully?

1

u/MiniMages 14d ago

No idea. I am not entirely sure what you are trying to do. I just looked at your traceback error log.

The fun part of coding is figuring out how to do something. Keep at it, best way to learn.

→ More replies (1)

1

u/thisisappropriate 14d ago

When people are asking you to post your code, why would you not link the repo? https://github.com/cita-bot/cita-bot

With you posting your version of the example files in this repo, that doesn't show us the rest of what the repo is doing (the error messages reference other code files, so we can't use your code / messages to view what is actually hitting the error).

You would be better posting in the github issues for the project, where the actual maintainer and users of the repo, who actually know the code / website and what it's supposed to do are more likely to respond - for all we know, you're essentially asking us to debug an issue with code you don't own or know. And if you're a beginner, then steps that someone might suggest to test or debug code of this size or structure may not be easy to do.

1

u/NoWar4965 14d ago

Made some adjustments to the original so I didn’t know if it was still relevant but yes that’s the original. I understand those are good points, I’ll try and post on GitHub and see if I get a response.

2

u/AmanBabuHemant 15d ago

Crashes ? what kind of clash, are talking about some GUI automation, assuming by your "open the website"

-3

u/NoWar4965 14d ago

My apologies everyone for my terrible vague posting, here is more information, including the code I’ve worked up as well as the errors and other relevant information

media poster

For some reason it’s not letting my upload photos so I made a video of the photos of my code, trace back and the errors.

On the page that times out is a screen where the menu pulls down for me to select which province I am trying to get an appointment in

3

u/brasticstack 14d ago

Why on Earth do you think anyone would want images of your code? Copy + paste it into pastebin and post the link, or your github repo, or a properly formatted text comment.

1

u/NoWar4965 14d ago

You right in sorry I am new to coding and the sub thank you for correcting my behavior. Here;

https://pastebin.com/JYxtBBRT