I have confirmed that the api object can successfully make requests to other endpoints and therefore there is no issue with my credentials.
I am using
Python 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] on win32
The following error occurs:
$ python direct_message.py
Traceback (most recent call last):
File "C:\Users\ABC\Documents\Me\git\project\direct_message.py", line 33, in
r = api.request('direct_messages/events/new', json.dumps(event))
File "C:\Users\ABC\Documents\Me\git\project\venv\lib\site-packages\TwitterAPI\TwitterAPI
.py", line 179, in request
params['delimited'] = 'length'
TypeError: 'str' object does not support item assignment
I am trying to send a direct message using https://github.com/geduldig/TwitterAPI/blob/master/examples/v1.1/direct_message.py
I have confirmed that the api object can successfully make requests to other endpoints and therefore there is no issue with my credentials.
I am using Python 3.9.4 (tags/v3.9.4:1f2e308, Apr 6 2021, 13:40:21) [MSC v.1928 64 bit (AMD64)] on win32
The following error occurs:
$ python direct_message.py Traceback (most recent call last): File "C:\Users\ABC\Documents\Me\git\project\direct_message.py", line 33, in
r = api.request('direct_messages/events/new', json.dumps(event))
File "C:\Users\ABC\Documents\Me\git\project\venv\lib\site-packages\TwitterAPI\TwitterAPI
.py", line 179, in request
params['delimited'] = 'length'
TypeError: 'str' object does not support item assignment