Python Forum
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Errno 22] Invalid argument
#11
(Feb-11-2020, 03:01 PM)snippsat Wrote: Look like your editor have introduced a non-printing character U-202A is LEFT-TO-RIGHT EMBEDDING.
It's there even if you can not see it,this is a copy of code from your post.
>>> s = r'‪C:\Users\Eli T\Desktop\ENSO.xlsx'
>>> s
'\u202aC:\\Users\\Eli T\\Desktop\\ENSO.xlsx'
A temp fix could be this,you should investigate editor,eg try and other and see if it's happen there to.
>>> s = r'‪C:\Users\Eli T\Desktop\ENSO.xlsx'
>>> s
'\u202aC:\\Users\\Eli T\\Desktop\\ENSO.xlsx'
>>> 
>>> s = s.lstrip('\u202a')
>>> s
'C:\\Users\\Eli T\\Desktop\\ENSO.xlsx'
>>> enso = pd.read_excel(s, 'r')
hi, in Spyder, by default, how to remove '\u202a'? Thank you
Reply
#12
Jupyter does not have this error: \u202a
How to configure Spyder IDE to rectify it? Thank you
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Invalid argument: 'images\x08ackground.jpg' CatBall 4 902 Jun-19-2023, 09:28 AM
Last Post: CatBall
  [split] [Errno 22] Invalid argument Junaid 0 2,253 Jun-12-2021, 06:02 PM
Last Post: Junaid
  zlib decompress error: invalid code lengths set / invalid block type DreamingInsanity 0 6,739 Mar-29-2020, 12:44 PM
Last Post: DreamingInsanity
  SyntaxError: positional argument follows keyword argument syd_jat 3 5,728 Mar-03-2020, 08:34 AM
Last Post: buran
  Invalid argument error thrown. pyseeker 4 8,568 Sep-10-2019, 07:03 PM
Last Post: pyseeker
  OSError: [Errno 22] Invalid argument - wasn't there last time I ran the code! meganhollie 2 9,125 Jun-11-2018, 06:01 PM
Last Post: meganhollie
  [SOLVED] OSError: [Errno 22] Invalid argument Panda 13 43,615 Jun-04-2018, 08:33 PM
Last Post: volcano63
  [Errno 22] Invalid argument Asafb 8 13,432 Dec-19-2017, 12:52 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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