dmarx / psaw

Python Pushshift.io API Wrapper (for comment/submission search)
BSD 2-Clause "Simplified" License
361 stars 53 forks source link

Resolving TypeError #77

Closed lolamathematician closed 4 years ago

lolamathematician commented 4 years ago

I hit an error

psaw ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host On inspecting the stack trace there were a couple of exceptions the final of which was not handled and terminated the program. Final error log.debug("Connection error caught, retrying. Connection attempts so far: %s" % i+1) TypeError: can only concatenate str (not "int") to str I did not capture the full stack trace at the time and am currently unable to replicate but it was resolved with the proposed change.

dmarx commented 4 years ago

Should probably use (" ... %d " % (i+1) ) instead, but I'll take it for now since this looks safe enough.