git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WHY it compains about the missing argument is WHAT i don't understand


plugin = bottle_pymysql.Plugin( dbuser='user', dbpass='pass', dbname='counters', dictrows=False )
app.install(plugin)

.......
.......

@app.route( '/' )
@auth_basic( counters.is_authenticated_user )
def listall( pymydb ):

But when i try to load the app's URL like  http://superhost.gr/clientele as you can see i get this error:


Exception:
TypeError("listall() missing 1 required positional argument: 'pymydb'",)
Traceback:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/usr/lib/python3.6/site-packages/bottle.py", line 1740, in wrapper
    rv = callback(*a, **ka)
  File "/usr/lib/python3.6/site-packages/bottle.py", line 2690, in wrapper
    return func(*a, **ka)
TypeError: listall() missing 1 required positional argument: 'pymydb'

listall() is `/` route's callback function and i never inside my script i call  listall( pymydb ).
Why it compains about the missing argument is WHAT i don't understand.