Python Forum
Function throws error but then works?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function throws error but then works?
#10
(Sep-11-2020, 11:30 PM)Milfredo Wrote: Okay. It's just I got chastised the other day for putting too much code up. So here goes.

No one wants to look through a thousand lines of irrelevant code. At the same time, it's impossible to help if we can't see what you're doing. Even the code itself isn't always enough if there's some quirk of the input data that's the problem.

Best is you make your program modular enough that when you have a problem, you can track down the error in just one part and post an easily-reproducible example. The best examples are short and can be pasted onto some other machine and run to show the problem.


That said, I don't understand this at all. Your trace shows if i['track'] == 'AP ': threw a problem in load_track_to_Handi. But that line doesn't appear in that function or elsewhere in your code. Is the version you pasted the same one that generated that error? Right now it looks like that function does nothing but print some lines to stdout. It doesn't return any data.
Reply


Messages In This Thread
Function throws error but then works? - by Milfredo - Sep-11-2020, 06:12 AM
RE: Function throws error but then works? - by bowlofred - Sep-11-2020, 11:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  DF.groupby(col).min works, mean gets a "not implemented" error samgardner5 3 709 Feb-29-2024, 06:13 PM
Last Post: deanhystad
  Pandas - error when running Pycharm, but works on cmd line zxcv101 1 1,418 Jun-18-2022, 01:09 PM
Last Post: snippsat
  pymysql: insert query throws error wardancer84 12 4,823 Jan-28-2022, 06:48 AM
Last Post: wardancer84
  pyarrow throws oserror winerror 193 1 is not a valid win32 application aupres 2 3,882 Oct-21-2020, 01:04 AM
Last Post: aupres
  delete a file works but with error Leon79 4 3,010 Jul-14-2020, 06:51 AM
Last Post: snippsat
  python/winrt Bluetooth.GenericAttributProfile CreateAsync(GUID) method throws Not Imp pbvinoth 0 2,183 Jul-08-2020, 04:27 AM
Last Post: pbvinoth
  Can't find error in code but Python throws exception Sandwich_masterX 3 3,027 Oct-09-2018, 01:38 AM
Last Post: ichabod801
  Need to understand the way enumerate() function works abhishekambastha 2 2,536 Sep-16-2018, 08:21 PM
Last Post: snippsat
  Jython code throws ImportError when invoked from a Java jar dchucks 6 7,262 Aug-02-2018, 05:09 AM
Last Post: dchucks
  Script works ok on windows but gives error on ubuntu papampi 3 4,126 Oct-11-2017, 04:17 PM
Last Post: papampi

Forum Jump:

User Panel Messages

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