Python Forum
TypeError: a bytes-like object is required
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: a bytes-like object is required
#11
Ah ok, I think I have not understood the purpose of the program. I thought it took elements from the source code to convert the PIC file format into human readable, but in the below structure:

Pickup Locations (*.PIC):
 
Magic Number: uint32
Pic Version Number: uint32
 
NumRegenPoints: int16
{
    gen_type: int16
      regen_type: int16
       gen_delay: float
       life_span: float
             pos: VECTOR
             {
               x: float
               y: float
               z: float
             }
           group: int16
            Type: int16
      TriggerMod: int16
}
From what you have said even if it executed properly once it is in the YAML format it will still be mostly useless in relation to the above structure?
Reply
#12
You can read a YAML file and it will output in binary pic format. You decide if that is worthless or not.
Reply
#13
Sorry I am a little confused, I thought the PIC file format was just something assigned by the original programmers because it was short for "pickup". Is PIC a type of binary?
Reply
#14
It is probably not a standard format, but it would still be a file format as far as your application is concerned. Binary files formatted in a certain way can be used by your program. May as well give the format a name.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Merge htm files with shutil library (TypeError: 'module' object is not callable) Melcu54 7 3,394 Mar-09-2025, 04:25 PM
Last Post: Pedroski55
  I am getting this TypeError: 'TreasureMap' object is not subscriptable. makilakos 2 1,241 May-25-2024, 07:58 PM
Last Post: deanhystad
  TypeError: cannot pickle ‘_asyncio.Future’ object Abdul_Rafey 1 2,719 Mar-07-2024, 03:40 PM
Last Post: deanhystad
  error in class: TypeError: 'str' object is not callable akbarza 2 1,745 Dec-30-2023, 04:35 PM
Last Post: deanhystad
Bug TypeError: 'NoneType' object is not subscriptable TheLummen 4 3,603 Nov-27-2023, 11:34 AM
Last Post: TheLummen
  TypeError: 'NoneType' object is not callable akbarza 4 14,001 Aug-24-2023, 05:14 PM
Last Post: snippsat
  [NEW CODER] TypeError: Object is not callable iwantyoursec 5 5,610 Aug-23-2023, 06:21 PM
Last Post: deanhystad
  TypeError: 'float' object is not callable #1 isdito2001 1 1,900 Jan-21-2023, 12:43 AM
Last Post: Yoriz
  TypeError: 'float' object is not callable TimofeyKolpakov 3 3,525 Dec-04-2022, 04:58 PM
Last Post: TimofeyKolpakov
  API Post issue "TypeError: 'str' object is not callable" makeeley 2 3,595 Oct-30-2022, 12:53 PM
Last Post: makeeley

Forum Jump:

User Panel Messages

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