Closed david2278 closed 6 months ago
Hi,
The interface we provide expects a string not an object with a __str__
method. Being explicit and less complex follows the Zen of Python so we won't be making such a change. It's the caller's responsibility to pass in the correct type.
FYI, I see you're using altcointip. I had rewrote much of it specific for nyan coin a few years ago. You might find it easier to work from that source code and make adjustments necessary for whatever coin you're supporting (if you only need a single coin support): https://github.com/mathwizard1232/tipnyan
Sorry, I was under the impression that it was an edge case from within the praw library since the call stack was 5 levels deep within praw. I went and checked the calling function in alttipbot and I think I've resolved this particular issue now though.
Thanks I'll definitely check it out! I've been upgrading altipbot to python3 so I can have the latest version of praw. I don't want to get into a situation where reddit makes an api breaking change and I can't get the latest version of praw because I'm on python2.
Describe the Bug
When running fullname.py, it fails saying "Comment not iterable". This is because line 17 expects a string.
In my project, I added
self.id = str(self.id)
above line 17 to resolve the error. This may have side effects though so a temporary variable might be better.Possible solution (in fullname.py):
Desired Result
fullname.py gracefully handles non-string input by attempting to convert the object to a string
Code to reproduce the bug
My code does not include sensitive credentials
Relevant Logs
This code has previously worked as intended
I'm not sure, I haven't used this code before.
Operating System/Environment
Ubuntu 22.0.4 WSL
Python Version
Python 3.8.10
PRAW Version
7.7.1
Links, references, and/or additional comments?
prawFunc is the comment function on an instance of the reddit class