leogomezz4t / PyTextNow_API

Python texting API utilizing TextNow API
MIT License
67 stars 41 forks source link

issue with get_user() #29

Closed bryanperez43 closed 3 years ago

bryanperez43 commented 3 years ago
client = pytextnow.Client('sdfds')
File "C:\Users\emeri\Projects\Personal\PyTextNow_API\venv\lib\site-packages\pytextnow-2.0.0-py3.7.egg\pytextnow\TNAPI.py", line 33, in __init__
File "C:\Users\emeri\Projects\Personal\PyTextNow_API\venv\lib\site-packages\pytextnow-2.0.0-py3.7.egg\pytextnow\database\db.py", line 538, in get_user
AttributeError: 'list' object has no attribute 'first'

to recreate.. create a pytextnow.Client() instance and give it a random client.

SilverStrings024 commented 3 years ago

Can we discuss this? I'd like to know what's causing it and try to fix it without having to instantiate a client that's useless other than for initial start since a good amount of memory can possibly be used depending on alot of variables.

Remember that there will be at least two threads at program start (event listener and the main thread), also remember that the event listener will spawn new threads and all of this need state dictionaries (state machines would be better but I want the methods stable before making worker objects so I can integrate working methods with the state machines) so the dictionaries can take alot of menory. The main reason this is happening is because of the if statements in execute_sql() if you go and take a look at them, you might see something I missed while writing it (interrupted. Will finish soon)

bryanperez43 commented 3 years ago

i fixed the issue