Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Try/Exept prints only ones
#2
I'm not sure the try/except is your problem. We don't have your inputs, so it's hard to see what's happening.

If you replace the "try" prints with something that always succeeds like
print(f"dir_f is {dir_f}")
Do you still only get one print?

You could do it as a conditional rather than a try/except.
Reply


Messages In This Thread
Try/Exept prints only ones - by tester_V - Nov-01-2020, 04:13 AM
RE: Try/Exept prints only ones - by bowlofred - Nov-01-2020, 04:40 AM
RE: Try/Exept prints only ones - by tester_V - Nov-01-2020, 05:52 AM
RE: Try/Exept prints only ones - by tester_V - Nov-01-2020, 06:11 AM
RE: Try/Exept prints only ones - by deanhystad - Nov-01-2020, 10:14 PM
RE: Try/Exept prints only ones - by tester_V - Nov-02-2020, 01:58 AM
RE: Try/Exept prints only ones - by deanhystad - Nov-02-2020, 03:41 AM
RE: Try/Exept prints only ones - by tester_V - Nov-02-2020, 03:44 AM
RE: Try/Exept prints only ones - by tester_V - Nov-02-2020, 03:56 AM
RE: Try/Exept prints only ones - by deanhystad - Nov-02-2020, 04:00 AM
RE: Try/Exept prints only ones - by deanhystad - Nov-02-2020, 04:25 AM
RE: Try/Exept prints only ones - by tester_V - Nov-03-2020, 02:38 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  zfill prints extra et the end of a var tester_V 4 985 Mar-24-2023, 06:59 PM
Last Post: tester_V
  variable prints without being declared. ClockPillow 2 1,876 Jul-11-2021, 12:13 AM
Last Post: ClockPillow
  Output prints Account.id at the end? LastStopDEVS 5 2,886 Dec-19-2020, 05:59 AM
Last Post: buran
  loop only prints last character. mcmxl22 1 1,770 Feb-17-2020, 02:36 AM
Last Post: menator01
  can you understand why this code prints None? arcbal 2 2,817 Mar-13-2019, 02:57 AM
Last Post: arcbal
  What for a file that prints nothing sylas 1 2,229 Sep-12-2018, 01:18 PM
Last Post: gruntfutuk

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020