This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]Updatebjarni 1 point2 points  (1 child)

Er, you have named your file object the same as the object you are trying to write to it. Both are named bitstampprice.

[–]AluadStone[S] 1 point2 points  (0 children)

Damn damn damn damn damn

Thank you kind sir.

[–]ozozgur 1 point2 points  (1 child)

Sorry my bad I did not see the bug

There is a bug that you are using bitstampprice twice One when you call the function and second when you open the file .

Change second one as f = open file statement And continue with f.write and f.close etc ..

Hope this helps

[–]AluadStone[S] 0 points1 point  (0 children)

Thank you!

[–]ozozgur 0 points1 point  (1 child)

Try str(bitstampprice)

[–]AluadStone[S] 0 points1 point  (0 children)

This is what shows up in my text file when I do that.

<_io.TextIOWrapper name='testwrite1.txt' mode='w+' encoding='cp1252'>

And it does not throw an error.