File Name issue
I am not sure if what I did to repair it but the problem is gone.
A copy/paste/rename was performed on the original code file and now I do not
get the error. No need for "r" or "\"...
WTH? I hate it when that happens.
"What rhymes with orange?"
"No it doesn't.."
From: Python-list <python-list-bounces+gronicus=sga.ninja at python.org> On
Behalf Of MRAB
Sent: Saturday, October 17, 2020 7:31 PM
To: python-list at python.org
Subject: Re: File Name issue
On 2020-10-17 23:12, Steve wrote:
> The line:
> with open("HOURLYLOG.txt", 'r') as infile:
> works but, when I rename the file, the line:
> with open("HOURLY-LOG.txt", 'r') as infile:
> does not. The complaint is: Cannot Assign to operator
> However, I have:
> And it works.
> At first, I thought the issue was due to having the - in the filename.
> Is there a fix or explanation for this?
I see nothing wrong in those lines as written.
Try reducing it to the smallest complete example that shows the problem.