Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error when using FIND
#3
What is irec? Is it str or bytes? If it is bytes, your search pattern must also be bytes. Either way you should use a raw literal for the pattern to prevent "\x" being interpreted as an escape sequence marking the start of a hexadecimal number.
xrefstart=irec.find(r"\x - \xo ")
Reply


Messages In This Thread
Error when using FIND - by WJSwan - Jan-27-2023, 05:36 AM
RE: Error when using FIND - by noisefloor - Jan-27-2023, 05:47 AM
RE: Error when using FIND - by deanhystad - Jan-27-2023, 05:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Error in find pearson correlation function erneelgupta 1 2,007 Mar-01-2022, 03:41 PM
Last Post: stevendaprano
  Getting 'NoneType' object has no attribute 'find' error when WebScraping with BS Franky77 2 5,529 Aug-17-2021, 05:24 PM
Last Post: Franky77
  List of error codes to find (and count) in all files in a directory tester_V 8 3,962 Dec-11-2020, 07:07 PM
Last Post: tester_V
  Cant find root cause of thread.lock error burlyboys 0 1,628 May-18-2020, 12:51 PM
Last Post: burlyboys
  How to ignore - ERROR: The system was unable to find the specified registry key or va asheru93 9 6,929 Feb-04-2019, 06:35 AM
Last Post: asheru93
  Can't find error in code but Python throws exception Sandwich_masterX 3 3,104 Oct-09-2018, 01:38 AM
Last Post: ichabod801
  subprocess error : The system cannot find the file specified evilcode1 0 10,831 Oct-03-2018, 08:04 AM
Last Post: evilcode1
  Getting error str object is not callable in find by xpath sumandas89 3 11,109 Aug-14-2018, 03:05 PM
Last Post: mlieqo
  Windows cannot find "wish.exe" - error while trying to run PAGE Nwb 0 7,611 Jun-11-2018, 12:08 PM
Last Post: Nwb

Forum Jump:

User Panel Messages

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