Python Forum
How do I use tabs and spaces? (how to resolve error TabError: inconsistent)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I use tabs and spaces? (how to resolve error TabError: inconsistent)
#6
(May-20-2021, 04:46 PM)Onanism Wrote: writer.writerow(["Rekening", "Datum", "Omschrijving",
TypeError: a bytes-like object is required, not 'str'
(May-20-2021, 04:46 PM)Onanism Wrote:         ofile = open(self.ofname, "wb")

Well that is weird. I'm not sure but I see you are opening the outputfile as "wb" (= write binary). Perhaps you should open the file as "w" instead.
Reply


Messages In This Thread
RE: How do I use tabs and spaces? (how to resolve error TabError: inconsistent) - by ibreeden - May-21-2021, 08:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with removing spaces and tabs from a string msqpython 14 4,086 Jan-21-2021, 10:48 PM
Last Post: deanhystad
  How Can I Resolve This Error JayJayOi 10 7,446 Jan-18-2018, 02:59 PM
Last Post: JayJayOi

Forum Jump:

User Panel Messages

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