Advertisement
Guest User

Weird web2py facebook login database error

a guest
Mar 8th, 2013
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.12 KB | None | 0 0
  1. Error ticket for "helloFacebook"
  2. Ticket ID
  3.  
  4. 127.0.0.1.2013-03-08.09-04-36.4da567fb-f3d8-461b-a1ad-936c1048c1a4
  5. <type 'exceptions.SyntaxError'> No fields to update
  6. Version
  7. web2py™ (2, 4, 2, 'stable', datetime.datetime(2013, 3, 4, 3, 26, 21))
  8. Python Python 2.7.3: myproject/venv/bin/python (prefix: myproject/venv)
  9.  
  10.  
  11. -----------------------------------------------------------------------------------
  12. Traceback
  13. ---
  14.  
  15. Traceback (most recent call last):
  16. File "myproject/gluon/restricted.py", line 212, in restricted
  17. exec ccode in environment
  18. File "myproject/applications/helloFacebook/controllers/default.py", line 278, in <module>
  19. File "myproject/gluon/globals.py", line 193, in <lambda>
  20. self._caller = lambda f: f()
  21. File "myproject/applications/helloFacebook/controllers/default.py", line 255, in user
  22. return dict(form=auth())
  23. File "myproject/gluon/tools.py", line 1242, in __call__
  24. return getattr(self, args[0])()
  25. File "myproject/gluon/tools.py", line 2100, in login
  26. self.settings.update_fields)
  27. File "myproject/gluon/tools.py", line 1740, in get_or_create_user
  28. user.update_record(**update_keys)
  29. File "myproject/gluon/dal.py", line 9883, in __call__
  30. table._db(table._id==id,ignore_common_filters=True).update(**newfields)
  31. File "myproject/gluon/dal.py", line 9792, in update
  32. raise SyntaxError("No fields to update")
  33. SyntaxError: No fields to update
  34.  
  35. -----------------------------------------------------------------------------------
  36. default.py file contains:
  37.  
  38. 240
  39. 241 def user():
  40. 242 """
  41. 243 exposes:
  42. 244 http://..../[app]/default/user/login
  43. 245 http://..../[app]/default/user/logout
  44. 246 http://..../[app]/default/user/register
  45. 247 http://..../[app]/default/user/profile
  46. 248 http://..../[app]/default/user/retrieve_password
  47. 249 http://..../[app]/default/user/change_password
  48. 250 use @auth.requires_login()
  49. 251 @auth.requires_membership('group name')
  50. 252 @auth.requires_permission('read','table name',record_id)
  51. 253 to decorate functions that need access control
  52. 254 """
  53. 255 return dict(form=auth())
  54. 256
  55. 257
  56. 258 def download():
  57. 259 """
  58. 260 allows downloading of uploaded files
  59. 261 http://..../[app]/default/download/[filename]
  60. 262 """
  61. 263 return response.download(request,db)
  62. 264
  63. 265
  64. 266 def call():
  65. 267 """
  66. 268 exposes services. for example:
  67. 269 http://..../[app]/default/call/jsonrpc
  68. 270 decorate with @services.jsonrpc the functions to expose
  69. 271 supports xml, json, xmlrpc, jsonrpc, amfrpc, rss, csv
  70. 272 """
  71. 273 session.forget()
  72. 274 return service()
  73.  
  74.  
  75. --------------------------------------------------------------------------------------------
  76. Context:
  77.  
  78. locals
  79. db :
  80. <DAL uri="sqlite://heroku.test.sqlite">
  81. fields :
  82. []
  83. self :
  84. <Set (auth_user.id = 2)>
  85. table :
  86. <Table auth_user (id,first_name,last_name,username,password,registration_key)>
  87. tablename :
  88. 'auth_user'
  89. update_fields :
  90. {}
  91. request
  92. ajax :
  93. False
  94. application :
  95. helloFacebook
  96. args :
  97. login
  98. body :
  99. <cStringIO.StringO object at 0x2b87880>
  100. cid :
  101. None
  102. client :
  103. 127.0.0.1
  104. controller :
  105. default
  106. cookies :
  107. session_id_admin :
  108. 127.0.0.1-9c6fcd7e-bb48-4d9b-a133-5d7e1746676d
  109. comment :
  110. domain :
  111. expires :
  112. httponly :
  113. max-age :
  114. path :
  115. secure :
  116. version :
  117. session_id_hellofacebook :
  118. 127.0.0.1-56ab77ae-168b-4c3d-98e0-846f004c84cf
  119. comment :
  120. domain :
  121. expires :
  122. httponly :
  123. max-age :
  124. path :
  125. secure :
  126. version :
  127. session_id_linkard :
  128. 127.0.0.1-e84e19b4-9e53-475b-9de1-b4f343830ebd
  129. comment :
  130. domain :
  131. expires :
  132. httponly :
  133. max-age :
  134. path :
  135. secure :
  136. version :
  137. session_id_welcome :
  138. 127.0.0.1-d3df6cc4-3691-4ad5-ae8f-ec1b1311859a
  139. comment :
  140. domain :
  141. expires :
  142. httponly :
  143. max-age :
  144. path :
  145. secure :
  146. version :
  147. env :
  148. app_folders :
  149. set(['myproject/applications/helloFacebook/'])
  150. applications_parent :
  151. myproject
  152. db_sessions :
  153. set([])
  154. debugging :
  155. False
  156. gluon_parent :
  157. myproject
  158. gunicorn_socket :
  159. <socket._socketobject object at 0x2b6f8a0>
  160. http_accept :
  161. text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  162. http_accept_encoding :
  163. gzip, deflate
  164. http_accept_language :
  165. en-US,en;q=0.5
  166. http_connection :
  167. keep-alive
  168. http_cookie :
  169. session_id_welcome=127.0.0.1-d3df6cc4-3691-4ad5-ae8f-ec1b1311859a; session_id_admin=127.0.0.1-9c6fcd7e-bb48-4d9b-a133-5d7e1746676d; session_id_hellofacebook=127.0.0.1-56ab77ae-168b-4c3d-98e0-846f004c84cf
  170. http_host :
  171. 127.0.0.1:5000
  172. http_user_agent :
  173. Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0
  174. is_jython :
  175. False
  176. is_pypy :
  177. False
  178. local_hosts :
  179. cotita
  180. ::1
  181. 127.0.1.1
  182. ::ffff:127.0.0.1
  183. 127.0.0.1
  184. path_info :
  185. /helloFacebook/default/user/login
  186. query_string :
  187. _next=/helloFacebook/default/my_wishes
  188. raw_uri :
  189. /helloFacebook/default/user/login?_next=/helloFacebook/default/my_wishes
  190. remote_addr :
  191. 127.0.0.1
  192. remote_port :
  193. 36122
  194. request_method :
  195. GET
  196. request_uri :
  197. /helloFacebook/default/user/login?_next=/helloFacebook/default/my_wishes
  198. script_name :
  199. server_name :
  200. 127.0.0.1
  201. server_port :
  202. 5000
  203. server_protocol :
  204. HTTP/1.1
  205. server_software :
  206. gunicorn/0.17.2
  207. web2py_crontype :
  208. soft
  209. web2py_path :
  210. myproject
  211. web2py_version :
  212. 2
  213. 4
  214. 2
  215. stable
  216. datetime.datetime(2013, 3, 4, 3, 26, 21)
  217. wsgi_errors :
  218. <open file '<stderr>', mode 'w' at 0x7f7bd48ff270>
  219. wsgi_file_wrapper :
  220. <class gunicorn.http.wsgi.FileWrapper at 0x28eba78>
  221. wsgi_input :
  222. <gunicorn.http.body.Body object at 0x2b84dd0>
  223. wsgi_multiprocess :
  224. False
  225. wsgi_multithread :
  226. False
  227. wsgi_run_once :
  228. False
  229. wsgi_url_scheme :
  230. http
  231. wsgi_version :
  232. 1
  233. 0
  234. extension :
  235. html
  236. folder :
  237. myproject/applications/helloFacebook/
  238. function :
  239. user
  240. get_vars :
  241. global_settings :
  242. app_folders :
  243. set(['myproject/applications/helloFacebook/'])
  244. applications_parent :
  245. myproject
  246. db_sessions :
  247. set([])
  248. debugging :
  249. False
  250. gluon_parent :
  251. myproject
  252. is_jython :
  253. False
  254. is_pypy :
  255. False
  256. local_hosts :
  257. cotita
  258. ::1
  259. 127.0.1.1
  260. ::ffff:127.0.0.1
  261. 127.0.0.1
  262. web2py_crontype :
  263. soft
  264. web2py_version :
  265. 2
  266. 4
  267. 2
  268. stable
  269. datetime.datetime(2013, 3, 4, 3, 26, 21)
  270. is_https :
  271. False
  272. is_local :
  273. True
  274. is_restful :
  275. False
  276. now :
  277. datetime.datetime(2013, 3, 8, 9, 4, 36, 316308)
  278. post_vars :
  279. raw_args :
  280. login
  281. raw_extension :
  282. None
  283. url :
  284. /helloFacebook/default/user/login
  285. utcnow :
  286. datetime.datetime(2013, 3, 8, 8, 4, 36, 316318)
  287. uuid :
  288. helloFacebook/127.0.0.1.2013-03-08.09-04-36.4da567fb-f3d8-461b-a1ad-936c1048c1a4
  289. vars :
  290. wsgi :
  291. environ :
  292. HTTP_ACCEPT :
  293. text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
  294. HTTP_ACCEPT_ENCODING :
  295. gzip, deflate
  296. HTTP_ACCEPT_LANGUAGE :
  297. en-US,en;q=0.5
  298. HTTP_CONNECTION :
  299. keep-alive
  300. HTTP_COOKIE :
  301. session_id_welcome=127.0.0.1-d3df6cc4-3691-4ad5-ae8f-ec1b1311859a; session_id_admin=127.0.0.1-9c6fcd7e-bb48-4d9b-a133-5d7e1746676d; session_id_hellofacebook=127.0.0.1-56ab77ae-168b-4c3d-98e0-846f004c84cf
  302. HTTP_HOST :
  303. 127.0.0.1:5000
  304. HTTP_USER_AGENT :
  305. Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0
  306. PATH_INFO :
  307. /helloFacebook/default/user/login
  308. QUERY_STRING :
  309. _next=/helloFacebook/default/my_wishes
  310. RAW_URI :
  311. /helloFacebook/default/user/login?_next=/helloFacebook/default/my_wishes
  312. REMOTE_ADDR :
  313. 127.0.0.1
  314. REMOTE_PORT :
  315. 36122
  316. REQUEST_METHOD :
  317. GET
  318. REQUEST_URI :
  319. /helloFacebook/default/user/login?_next=/helloFacebook/default/my_wishes
  320. SCRIPT_NAME :
  321. SERVER_NAME :
  322. 127.0.0.1
  323. SERVER_PORT :
  324. 5000
  325. SERVER_PROTOCOL :
  326. HTTP/1.1
  327. SERVER_SOFTWARE :
  328. gunicorn/0.17.2
  329. gunicorn.socket :
  330. <socket._socketobject object at 0x2b6f8a0>
  331. wsgi.errors :
  332. <open file '<stderr>', mode 'w' at 0x7f7bd48ff270>
  333. wsgi.file_wrapper :
  334. <class gunicorn.http.wsgi.FileWrapper at 0x28eba78>
  335. wsgi.input :
  336. <cStringIO.StringO object at 0x2b87880>
  337. wsgi.multiprocess :
  338. False
  339. wsgi.multithread :
  340. False
  341. wsgi.run_once :
  342. False
  343. wsgi.url_scheme :
  344. http
  345. wsgi.version :
  346. 1
  347. response
  348. body :
  349. <cStringIO.StringO object at 0x2b87500>
  350. cookies :
  351. session_id_hellofacebook :
  352. 127.0.0.1-56ab77ae-168b-4c3d-98e0-846f004c84cf
  353. comment :
  354. domain :
  355. expires :
  356. httponly :
  357. max-age :
  358. path :
  359. /
  360. secure :
  361. version :
  362. delimiters :
  363. {{
  364. }}
  365. files :
  366. flash :
  367. generic_patterns :
  368. headers :
  369. X-Powered-By :
  370. web2py
  371. menu :
  372. Make a Wish
  373. False
  374. /helloFacebook/default/my_friends
  375. Wish List
  376. False
  377. /helloFacebook/default/my_wishes
  378. Matches
  379. False
  380. /helloFacebook/default/my_matches
  381. How To
  382. False
  383. /helloFacebook/default/howto
  384. Videos and Books
  385. False
  386. /helloFacebook/default/educational
  387. Products
  388. False
  389. /helloFacebook/default/products
  390. Settings
  391. False
  392. /helloFacebook/default/settings
  393. meta :
  394. models_to_run :
  395. ^\w+\.py$
  396. ^default/\w+\.py$
  397. ^default/user/\w+\.py$
  398. postprocessing :
  399. session_cookie_expires :
  400. None
  401. session_data_name :
  402. session_data_hellofacebook
  403. session_file :
  404. <open file 'myproject/applications/helloFacebook/sessions/127.0.0.1-56ab77ae-168b-4c3d-98e0-846f004c84cf', mode 'rb+' at 0x28d9540>
  405. session_filename :
  406. myproject/applications/helloFacebook/sessions/127.0.0.1-56ab77ae-168b-4c3d-98e0-846f004c84cf
  407. session_id :
  408. 127.0.0.1-56ab77ae-168b-4c3d-98e0-846f004c84cf
  409. session_id_name :
  410. session_id_hellofacebook
  411. session_locked :
  412. True
  413. session_new :
  414. False
  415. session_storage_type :
  416. file
  417. status :
  418. 200
  419. subtitle :
  420. title :
  421. helloFacebook
  422. view :
  423. default/user.html
  424.  
  425. --------------------------------------------------------------------------------------------
  426. Exception instance attributes
  427. __getslice__ <method-wrapper '__getslice__' of exceptions.SyntaxError object>
  428. text None
  429. __str__ <method-wrapper '__str__' of exceptions.SyntaxError object>
  430. __getattribute__ <method-wrapper '__getattribute__' of exceptions.SyntaxError object>
  431. __dict__ {}
  432. __sizeof__ <built-in method __sizeof__ of exceptions.SyntaxError object>
  433. __init__ <method-wrapper '__init__' of exceptions.SyntaxError object>
  434. __setattr__ <method-wrapper '__setattr__' of exceptions.SyntaxError object>
  435. __reduce_ex__ <built-in method __reduce_ex__ of exceptions.SyntaxError object>
  436. __new__ <built-in method __new__ of type object>
  437. __format__ <built-in method __format__ of exceptions.SyntaxError object>
  438. __class__ <type 'exceptions.SyntaxError'>
  439. filename None
  440. lineno None
  441. msg 'No fields to update'
  442. __doc__ 'Invalid syntax.'
  443. __getitem__ <method-wrapper '__getitem__' of exceptions.SyntaxError object>
  444. __setstate__ <built-in method __setstate__ of exceptions.SyntaxError object>
  445. __reduce__ <built-in method __reduce__ of exceptions.SyntaxError object>
  446. print_file_and_line None
  447. args ('No fields to update',)
  448. __subclasshook__ <built-in method __subclasshook__ of type object>
  449. offset None
  450. __unicode__ <built-in method __unicode__ of exceptions.SyntaxError object>
  451. __delattr__ <method-wrapper '__delattr__' of exceptions.SyntaxError object>
  452. __repr__ <method-wrapper '__repr__' of exceptions.SyntaxError object>
  453. __hash__ <method-wrapper '__hash__' of exceptions.SyntaxError object>
  454.  
  455. --------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement