Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Issue with bottle-pymysql
#11
(Feb-19-2019, 05:09 PM)nikos Wrote: First positional arg you mean.
the last positional, e.g. if you have page
as positional it will be
@app.route( '/<page>' )
def index(page, pymydb ):
(Feb-19-2019, 05:09 PM)nikos Wrote: I dont have anything else wrong AttributeError: 'NoneType' object has no attribute 'encoding' is refering to pymydb, perhaps it has no value?

Obviously you have something wrong :-). My point is, your original question was about not able to use keyword for the cursor and it was raising NameError. So now you know how to pass it. Start debuging the Attribute error.
Post full traceback and the relevant code that produce it (not just selected lines)
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#12
I cannot make it work. Is now says pymydb is not defined. I don't get it why the cursor not being defined?
Reply
#13
The crystal ball is not part of our inventory, yet. Good luck with debugging... How do you expect any help without showing any code and without posting full traceback? I simply give up.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#14
Thank you for willing to help, but due to other problems with encoding as well, i decided not to use bottle but Flask instead.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating tables with pymysql using Xampp newbie1 0 2,074 Jul-15-2020, 11:10 AM
Last Post: newbie1
  pymysql.err.InterfaceError nikos 1 2,998 Feb-24-2019, 02:07 PM
Last Post: nikos
  How to access routes using Bottle Framework nikos 5 4,203 Feb-13-2019, 11:43 PM
Last Post: nikos
  unable to import pymysql IMuriel 3 7,287 Jan-08-2019, 08:56 PM
Last Post: IMuriel
  Passing a query value from a Bottle html template to a route with an encoding nikos 0 2,890 Sep-30-2018, 03:29 AM
Last Post: nikos
  Insert data to SQL through pymysql and flask iainstott 3 7,656 Oct-24-2017, 03:04 PM
Last Post: iainstott
  please explain Bottle runtime log Kebap 4 7,420 Sep-22-2016, 05:40 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020