Error ticket for "admin" when trying to create a view

57 views
Skip to first unread message

mostwanted

unread,
Dec 15, 2021, 1:09:08 AM12/15/21
to web2py-users
Hi guys, I'm updating one of my very early projects, I was trying to create a view and I got an error:  Error ticket for "admin", I dont know what's causing it, how do I fix this? Its a new error that I have never encountered before, thats the traceback below. I developed it with  Version 2.14.6

Traceback
Traceback (most recent call last):
File "/home/sesoa/web2py/gluon/restricted.py", line 227, in restricted
exec ccode in environment
File "/home/sesoa/web2py/applications/admin/controllers/default.py", line 2000, in <module>
File "/home/sesoa/web2py/gluon/globals.py", line 417, in <lambda>
self._caller = lambda f: f()
File "/home/sesoa/web2py/applications/admin/controllers/default.py", line 1484, in create_file
redirect(request.vars.sender + anchor)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

Jim S

unread,
Dec 16, 2021, 12:31:55 PM12/16/21
to web2py-users
Looks like you're passing some data through the request vars and the value is Null.  Would need to see more code to be able to help.

-Jim

mostwanted

unread,
Dec 17, 2021, 6:56:35 AM12/17/21
to web2py-users
But that's just the thing, I wasn't trying pass any data, i just trying to create a new view for a new function In my admin interface, as soon as I clicked create the error popped up & the view failed to create.

mostwanted

unread,
Dec 17, 2021, 7:18:07 AM12/17/21
to web2py-users
Honestly i dont know what to rectify and where because the error is not coming from my code. This is function I was trying to create a view for, its a simple function

def sold_companies():
    details=db(db.sold_company).select()
    orgCount=len(details)
    return locals()

I have attached the image to the Error snapshot:
Screenshot (79).png

Jim Steil

unread,
Dec 17, 2021, 7:52:22 AM12/17/21
to web...@googlegroups.com
Is it possible your were no longer logged in or that you cleared your browser cache before this happened?

Sense really weird. Have you tried with a fresh install of web2py?

Jim

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/zmRXh10o4Y0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/5491225e-6ed7-4edc-9776-0bed44a99263n%40googlegroups.com.

mostwanted

unread,
Dec 17, 2021, 12:12:55 PM12/17/21
to web2py-users
This is happening on a live app, its live, hosted on pythonanywhere. I am starting to suspect something though, I recently received an email from pythonanywhere.com informing me that I should change  the system image of my app because my app is running on an old one called "dangermouse", in a year's time that system image will be absolute so I was encouraged to use a new one & I changed it. But they also warned that  my code might need modification to run with the new system image & i am starting to suspect that the system image i chose is the one affecting the normal functionality of my app!!!! Just suspicions because before i changed my system image all was good.

Jim Steil

unread,
Dec 17, 2021, 12:29:55 PM12/17/21
to web...@googlegroups.com
Yes, I would suspect the image off that is the main thing that changed.

Jim

Dave S

unread,
Dec 20, 2021, 11:24:41 PM12/20/21
to web2py-users
On Friday, December 17, 2021 at 9:12:55 AM UTC-8 mostwanted wrote:
This is happening on a live app, its live, hosted on pythonanywhere. I am starting to suspect something though, I recently received an email from pythonanywhere.com informing me that I should change  the system image of my app because my app is running on an old one called "dangermouse", in a year's time that system image will be absolute so I was encouraged to use a new one & I changed it. But they also warned that  my code might need modification to run with the new system image & i am starting to suspect that the system image i chose is the one affecting the normal functionality of my app!!!! Just suspicions because before i changed my system image all was good.


Did the python version change when you changed system images?  

Also, in the ticket you may be able to see which of request.vars.sender and anchor is the null value.

Dave S
/dps
Reply all
Reply to author
Forward
0 new messages