Help me!

 elif passwordtry1 == password:
        with open("student details for programming project.txt", "a", newline='') as file1:
           file1Reader = csv.reader(file1)
           for row in file1Reader:

for some reason this code doesnt work the error is :

Traceback (most recent call last):
File “N:\IT\year 11\prograMMING”, line 62, in
for row in file1Reader:
io.UnsupportedOperation: not readable

The error message has already stated that you haven’t give the permission to read the file but instead you opening it to write. Check the documentation.

Change the mode from 'a' to r.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.