robinhood-unofficial / pyrh

Python Framework to make trades with the unofficial Robinhood API
https://pyrh.readthedocs.io/en/latest/
MIT License
1.77k stars 603 forks source link

TypeError: unsupported operand type(s) for +: 'URL' and 'str' #268

Closed stevenvo closed 3 years ago

stevenvo commented 4 years ago

Checklist

Description

pyrh fails to return a result when calling function securities_owned()

Steps/Code to Reproduce

rh.securities_owned()

Results

Expected: list of owned securities Actual: error on https://github.com/robinhood-unofficial/pyrh/blob/master/pyrh/robinhood.py#L654

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-36-eeb4f4878ff3> in <module>
----> 1 rh.securities_owned()

~/.pyenv/versions/3.8.3/lib/python3.8/site-packages/pyrh/robinhood.py in securities_owned(self)
    652         """
    653 
--> 654         return self.get(urls.POSITIONS + "?nonzero=true")
    655 
    656     ###########################################################################

TypeError: unsupported operand type(s) for +: 'URL' and 'str'

Versions

import platform; print(platform.platform())
>> macOS-10.15.5-x86_64-i386-64bit
import sys; print("Python", sys.version)
>>Python 3.8.3 (default, Jul 14 2020, 00:27:13) 
>>[Clang 11.0.0 (clang-1100.0.33.8)]
import pyrh; print("pyrh", pyrh.__version__)
>>pyrh 2.0
stevenvo commented 4 years ago

Related to https://github.com/robinhood-unofficial/pyrh/issues/229 but different call.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one.