bottle icon indicating copy to clipboard operation
bottle copied to clipboard

copy.deepcopy(request.query) will raise exception

Open dantezhu opened this issue 13 years ago • 2 comments

bottle 0.10.11 the error is bellow:

Traceback (most recent call last):
  File "C:\Python27\lib\site-packages\bottle.py", line 744, in _handle
    return route.call(**args)
  File "C:\Python27\lib\site-packages\bottle.py", line 1529, in wrapper
    rv = callback(*a, **ka)
  File "C:\Python27\lib\site-packages\bottle.py", line 1479, in wrapper
    rv = callback(*a, **ka)
  File "x.py", line 16, in index
    print copy.deepcopy(request.query)
  File "C:\Python27\lib\copy.py", line 182, in deepcopy
    rv = reductor(2)
TypeError: 'unicode' object is not callable

dantezhu avatar Aug 06 '12 11:08 dantezhu

I tried following code but didn't get exception.

from bottle import route, run, request
import copy

@route('/')
def index():
    d = copy.deepcopy(request.query)
    return "Hello World"

run(host='localhost', port=8080)

vbmade2000 avatar Nov 03 '19 06:11 vbmade2000

@dantezhu Can you please post your full code or a POC that can reproduce an issue, here if possible ?

vbmade2000 avatar Nov 03 '19 06:11 vbmade2000