python 3.6.8
Title
Question
when i entered prime = loadtext('C:\\Users\\admin\\Desktop\\Pritesh-7-Python\\primes.txt') interpreter says syntax error: (unicode error) 'unicodeescape codex cant decode bytes in position 2-3: truncated\\UXXXXXXXX escape'
Python loading-data-from-files 02-03 min 10-20 sec
Answers:
Your file name / file path string that you have specified seems to contain some special character or unicode character. Please type out your file path manually in the command and it should work fine.
Do let us know if this sorts out the issue
i have manually typed this command but still getting the same error.
It would be better to keep the file in the current working directory to avoid any kind of errors. To check the current working directory type "pwd" in the ipython terminal.
done this too, still not working
by using !type directory i can call the prime.txt file content into ipython shell but prime=loadtxt('filepathe\\filename.txt') is not working
by using !type directory i can call the prime.txt file content into ipython shell but prime=loadtxt('filepathe\\filename.txt') is not working
Login to add comment
Login to add comment