Hello
I get an error ‘int’ object has no attribute ‘replace’ in line of code
dia = column.replace("-", "")
Why is tat? Both rows and columns have been assigned as “” strings. Why it say they’re int?
Hello
I get an error ‘int’ object has no attribute ‘replace’ in line of code
dia = column.replace("-", "")
Why is tat? Both rows and columns have been assigned as “” strings. Why it say they’re int?
Can you show us the full code?
If Python tells you column is an int, believe Python, it is an int.
The interpreter knows.
If you don’t want to believe it, put this line of code immediately
before the line:
print(column, type(column))
and see what gets printed.
Now look back at the rest of your code. Somewhere you have something
that assigns an int to column. It could be anything:
column = 17
column = int(column)
for column in range(something):
You need to read your code, carefully, looking for something,
anything, that changed column to an int. Then decide how you want to fix
it.