Forum Discussion
I tried executing the commands you gave me and i get the following error. Is that something you can help me?
>>> qbc.doquery(qid=1);
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/anaconda3/lib/python3.7/site-packages/pyqb/__init__.py", line 150, in doquery
res = self.__request('DoQuery', database, req)
File "/anaconda3/lib/python3.7/site-packages/pyqb/__init__.py", line 95, in __request
url = self.url + "/db/" + db
TypeError: can only concatenate str (not "NoneType") to str
>>>
------------------------------
Pushpakumar Gnana
------------------------------
------------------------------
Pushpakumar Gnana
------------------------------
- AustinK6 years agoQrew CommanderThe error is saying one of your variables is a NoneType. So one of them is not being populated as you expect it to be.
You have no other issues with the code? Do you know if you are able to authenticate fine?
I think I may have made a slight mistake and you may need to do this command instead, as there is no database being set. Assuming you used my exact code above without any changes. The "database" part just needs to be your table ID.
qbc.doquery(qid=1, database='your_database')- PushpakumarGna16 years agoQrew Assistant CaptainHi Austin,
Thanks a lot for the note. Let me try with table id and get back to you if i face any issues?
Thanks
Pushpakumar
------------------------------
Pushpakumar Gnanadurai
------------------------------ - PushpakumarGnan6 years agoQrew MemberHi Austin,
I changed the code to the table_id and ran the script. Still i have the following error. Can you please help?
>>> qbc.doquery(qid=1,database='bp7ejv2ma');
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/anaconda3/lib/python3.7/site-packages/pyqb/__init__.py", line 150, in doquery
res = self.__request('DoQuery', database, req)
File "/anaconda3/lib/python3.7/site-packages/pyqb/__init__.py", line 112, in __request
raise ResponseError('Received err #{0} : {1}'.format(errcode, errtext))
pyqb.ResponseError: Received err #83 : Invalid error code: 83
------------------------------
Pushpakumar Gnana
------------------------------- AustinK6 years agoQrew CommanderIf for some reason the library above is failing there is also the example at the bottom of this post on how to do this with Requests. It is a little more involved but the example file should have everything you need.
What Python version are you using for this? Looking at pyqb it has some potential issues with newer Pythons but not much is documented. I am testing it again myself and running into some issues using the newest Python. It worked fine for me before. I will let you know if I find anything out.
So far I have tried to authenticate via username and password, user token, and app token. None of them seemed to work but I may be missing something easy here.