[google-appengine] DEVSERVER ERROR: regular expression code size limit exceeded

2012-03-30 Thread Brian Becker
My regular expression is 47k. 

I get this error when running on the DevServer but it runs fine on GAE. 

*How can I increase the size of the Regular Expression limit on the 
DevServer?*

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/OBBlRIXI10AJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: DEVSERVER ERROR: regular expression code size limit exceeded

2012-04-12 Thread Brian Becker
I still need an answer to this. The RegEx runs great on GAE but not in the 
DevServer because it gives "regular expression code size limit exceeded" 

And yes, my RegEx is actually 47k.



On Friday, March 30, 2012 10:13:35 AM UTC-5, Brian Becker wrote:
>
> My regular expression is 47k. 
>
> I get this error when running on the DevServer but it runs fine on GAE. 
>
> *How can I increase the size of the Regular Expression limit on the 
> DevServer?*
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/vr3AW3QJnv0J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



RE: [google-appengine] Re: DEVSERVER ERROR: regular expression code size limit exceeded

2012-04-12 Thread Brian Becker
Whoops - detail missing: This is Python.

The code is very complex...I'm not sure how easy it will be to run it outside 
the DevServer. Is that really the only way to figure this out?

From: google-appengine@googlegroups.com 
[mailto:google-appengine@googlegroups.com] On Behalf Of Matthew Jaggard
Sent: Thursday, April 12, 2012 10:17 AM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Re: DEVSERVER ERROR: regular expression code 
size limit exceeded

Wow, that's some crazy regex.

Can you confirm that it runs correctly on your local JVM outside of the 
DevServer. If not, then this isn't a GAE issue - you need to find out why from 
your JVM provider. Maybe Google use 64bit and you use 32bit? Or different 
vendors (OpenJDK vs Sun vs whatever)?

Mat.
On 12 April 2012 16:12, Brian Becker mailto:br...@semo.net>> 
wrote:
I still need an answer to this. The RegEx runs great on GAE but not in the 
DevServer because it gives "regular expression code size limit exceeded"

And yes, my RegEx is actually 47k.



On Friday, March 30, 2012 10:13:35 AM UTC-5, Brian Becker wrote:
My regular expression is 47k.

I get this error when running on the DevServer but it runs fine on GAE.

How can I increase the size of the Regular Expression limit on the DevServer?
--
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/vr3AW3QJnv0J.
To post to this group, send email to 
google-appengine@googlegroups.com<mailto:google-appengine@googlegroups.com>.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com<mailto:google-appengine%2bunsubscr...@googlegroups.com>.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

--
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] __setattr__ and __getattr__ causing memcacahe error in 1.8.5

2013-09-30 Thread Brian Becker
After upgrading to 1.8.5 (from 1.8.1) I instantly had Internal Server Error 
whenever my class was instantiated and placed in memcache:
  daRef = oRefFinder()
  memcache.set( 'theRef', daRef)

The last lines of the error trace says that the memcache.set command:

  File "/base/data/home/apps/s~refindservice/1.370602298270267557/main.py", 
line 117, in get
memcache.set('theRef' , daRef )
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 763, in set
namespace=namespace)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 868, in _set_with_policy
time, '', namespace)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 947, in _set_multi_async_with_policy
stored_value, flags = _validate_encode_value(value, self._do_pickle)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 227, in _validate_encode_value
stored_value = do_pickle(value)
  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 392, in _do_pickle
pickler.dump(value)
TypeError: 'NoneType' object is not callable



I finally traced it to __setattr__ and __getattr__. If I go into my class 
and change  __setattr__ and __getattr__ methods to something else like 
tabooset and tabooget -- Memcache error goes away. G.

If I delete all the content in my __setattr__ and just put "pass" -- it 
still bombs -- so this is specific to the name of those methods.

First, what is going on? 
Second, is there some other way I'm supposed to be setting and getting 
attributes in my classes in GAE?

And yes, this was operating fine before I upgraded from 1.8.1 to 1.8.5.

Brian
 

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


RE: [google-appengine] Re: __setattr__ and __getattr__ causing memcacahe error in 1.8.5

2013-09-30 Thread Brian Becker
Yes.
 def __setattr__( self, name, value ):
   if name == 'orig':
# force value to string & kill whitespace
value = unicode(value).strip()

## Lots more cleaning is necessary
# clean off ending characters
value = value.rstrip(' ,;:)(')
# Ps 3:1; cf. => Ps 3:1
if value[-3:] == 'and': value = value.replace('and','')
if value[-2:] == 'cf': value = value.replace('cf','')
# clean off ending characters again
value = value.rstrip(' ,;:)(')
self.__dict__[ 'orig'] = value

From: google-appengine@googlegroups.com 
[mailto:google-appengine@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 01, 2013 12:34 AM
To: google-appengine@googlegroups.com
Subject: [google-appengine] Re: __setattr__ and __getattr__ causing memcacahe 
error in 1.8.5

You should show some code.  Are you actually overriding __settattr__ and 
__getattr__ in your models ?

T

On Tuesday, October 1, 2013 12:34:12 PM UTC+8, Brian Becker wrote:
After upgrading to 1.8.5 (from 1.8.1) I instantly had Internal Server Error 
whenever my class was instantiated and placed in memcache:
  daRef = oRefFinder()
  memcache.set( 'theRef', daRef)

The last lines of the error trace says that the memcache.set command:

  File "/base/data/home/apps/s~refindservice/1.370602298270267557/main.py", 
line 117, in get

memcache.set('theRef' , daRef )

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 763, in set

namespace=namespace)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 868, in _set_with_policy

time, '', namespace)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 947, in _set_multi_async_with_policy

stored_value, flags = _validate_encode_value(value, self._do_pickle)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 227, in _validate_encode_value

stored_value = do_pickle(value)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 392, in _do_pickle

pickler.dump(value)

TypeError: 'NoneType' object is not callable


I finally traced it to __setattr__ and __getattr__. If I go into my class and 
change  __setattr__ and __getattr__ methods to something else like tabooset and 
tabooget -- Memcache error goes away. G.

If I delete all the content in my __setattr__ and just put "pass" -- it still 
bombs -- so this is specific to the name of those methods.

First, what is going on?
Second, is there some other way I'm supposed to be setting and getting 
attributes in my classes in GAE?

And yes, this was operating fine before I upgraded from 1.8.1 to 1.8.5.

Brian

--
You received this message because you are subscribed to a topic in the Google 
Groups "Google App Engine" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/google-appengine/2d9UO1m0wV8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
google-appengine+unsubscr...@googlegroups.com<mailto:google-appengine+unsubscr...@googlegroups.com>.
To post to this group, send email to 
google-appengine@googlegroups.com<mailto:google-appengine@googlegroups.com>.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


RE: [google-appengine] Re: __setattr__ and __getattr__ causing memcacahe error in 1.8.5

2013-10-01 Thread Brian Becker
Neither, it is strictly a service which processes a string and spits back a 
result.


From: google-appengine@googlegroups.com 
[mailto:google-appengine@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 01, 2013 3:34 AM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Re: __setattr__ and __getattr__ causing 
memcacahe error in 1.8.5

On further though I really think you are going about this the wrong way.

You haven;'t said if you using ndb or db, if you are using ndb you should be 
providing a function to validator argument that will co-erce the data for you.
Alternately subclass the Property to provide the functionality you want and not 
override __setattr__ which as you have found out could/will cause problems
with new releases of the appengine runtime, as you are not using the public api 
for models/properties.

Tim

On Tuesday, October 1, 2013 1:51:13 PM UTC+8, Brian Becker wrote:
Yes.
 def __setattr__( self, name, value ):
   if name == 'orig':
# force value to string & kill whitespace
value = unicode(value).strip()

## Lots more cleaning is necessary
# clean off ending characters
value = value.rstrip(' ,;:)(')
# Ps 3:1; cf. => Ps 3:1
if value[-3:] == 'and': value = value.replace('and','')
if value[-2:] == 'cf': value = value.replace('cf','')
# clean off ending characters again
value = value.rstrip(' ,;:)(')
self.__dict__[ 'orig'] = value

From: google-a...@googlegroups.com 
[mailto:google-a...@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 01, 2013 12:34 AM
To: google-a...@googlegroups.com
Subject: [google-appengine] Re: __setattr__ and __getattr__ causing memcacahe 
error in 1.8.5

You should show some code.  Are you actually overriding __settattr__ and 
__getattr__ in your models ?

T

On Tuesday, October 1, 2013 12:34:12 PM UTC+8, Brian Becker wrote:
After upgrading to 1.8.5 (from 1.8.1) I instantly had Internal Server Error 
whenever my class was instantiated and placed in memcache:
  daRef = oRefFinder()
  memcache.set( 'theRef', daRef)

The last lines of the error trace says that the memcache.set command:

  File "/base/data/home/apps/s~refindservice/1.370602298270267557/main.py", 
line 117, in get

memcache.set('theRef' , daRef )

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 763, in set

namespace=namespace)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 868, in _set_with_policy

time, '', namespace)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 947, in _set_multi_async_with_policy

stored_value, flags = _validate_encode_value(value, self._do_pickle)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 227, in _validate_encode_value

stored_value = do_pickle(value)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 392, in _do_pickle

pickler.dump(value)

TypeError: 'NoneType' object is not callable


I finally traced it to __setattr__ and __getattr__. If I go into my class and 
change  __setattr__ and __getattr__ methods to something else like tabooset and 
tabooget -- Memcache error goes away. G.

If I delete all the content in my __setattr__ and just put "pass" -- it still 
bombs -- so this is specific to the name of those methods.

First, what is going on?
Second, is there some other way I'm supposed to be setting and getting 
attributes in my classes in GAE?

And yes, this was operating fine before I upgraded from 1.8.1 to 1.8.5.

Brian

--
You received this message because you are subscribed to a topic in the Google 
Groups "Google App Engine" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/google-appengine/2d9UO1m0wV8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
google-appeng...@googlegroups.com.
To post to this group, send email to google-...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google 
Groups "Google App Engine" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/google-appengine/2d9UO1m0wV8/unsubscribe.
To unsubscribe from this group and all its topics, send a

RE: [google-appengine] Re: __setattr__ and __getattr__ causing memcacahe error in 1.8.5

2013-10-01 Thread Brian Becker
I got rid of my __getattr__ and use @property for most of them. I didn't touch 
the __setattr__ but memcache is working just fine now. Strange.

Brian

From: google-appengine@googlegroups.com 
[mailto:google-appengine@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 01, 2013 3:57 AM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Re: __setattr__ and __getattr__ causing 
memcacahe error in 1.8.5

You are running into basic pickle problem then,

See this question on stackoverflow 
http://stackoverflow.com/questions/2049849/why-cant-i-pickle-this-object
The OP had exactly the same error as you.

T




On Tuesday, October 1, 2013 4:51:26 PM UTC+8, Brian Becker wrote:
Neither, it is strictly a service which processes a string and spits back a 
result.


From: google-a...@googlegroups.com 
[mailto:google-a...@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 01, 2013 3:34 AM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Re: __setattr__ and __getattr__ causing 
memcacahe error in 1.8.5

On further though I really think you are going about this the wrong way.

You haven;'t said if you using ndb or db, if you are using ndb you should be 
providing a function to validator argument that will co-erce the data for you.
Alternately subclass the Property to provide the functionality you want and not 
override __setattr__ which as you have found out could/will cause problems
with new releases of the appengine runtime, as you are not using the public api 
for models/properties.

Tim

On Tuesday, October 1, 2013 1:51:13 PM UTC+8, Brian Becker wrote:
Yes.
 def __setattr__( self, name, value ):
   if name == 'orig':
# force value to string & kill whitespace
value = unicode(value).strip()

## Lots more cleaning is necessary
# clean off ending characters
value = value.rstrip(' ,;:)(')
# Ps 3:1; cf. => Ps 3:1
if value[-3:] == 'and': value = value.replace('and','')
if value[-2:] == 'cf': value = value.replace('cf','')
# clean off ending characters again
value = value.rstrip(' ,;:)(')
self.__dict__[ 'orig'] = value

From: google-a...@googlegroups.com<mailto:google-a...@googlegroups.com> 
[mailto:google-a...@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 01, 2013 12:34 AM
To: google-a...@googlegroups.com<mailto:google-a...@googlegroups.com>
Subject: [google-appengine] Re: __setattr__ and __getattr__ causing memcacahe 
error in 1.8.5

You should show some code.  Are you actually overriding __settattr__ and 
__getattr__ in your models ?

T

On Tuesday, October 1, 2013 12:34:12 PM UTC+8, Brian Becker wrote:
After upgrading to 1.8.5 (from 1.8.1) I instantly had Internal Server Error 
whenever my class was instantiated and placed in memcache:
  daRef = oRefFinder()
  memcache.set( 'theRef', daRef)

The last lines of the error trace says that the memcache.set command:

  File "/base/data/home/apps/s~refindservice/1.370602298270267557/main.py", 
line 117, in get

memcache.set('theRef' , daRef )

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 763, in set

namespace=namespace)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 868, in _set_with_policy

time, '', namespace)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 947, in _set_multi_async_with_policy

stored_value, flags = _validate_encode_value(value, self._do_pickle)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 227, in _validate_encode_value

stored_value = do_pickle(value)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 392, in _do_pickle

pickler.dump(value)

TypeError: 'NoneType' object is not callable


I finally traced it to __setattr__ and __getattr__. If I go into my class and 
change  __setattr__ and __getattr__ methods to something else like tabooset and 
tabooget -- Memcache error goes away. G.

If I delete all the content in my __setattr__ and just put "pass" -- it still 
bombs -- so this is specific to the name of those methods.

First, what is going on?
Second, is there some other way I'm supposed to be setting and getting 
attributes in my classes in GAE?

And yes, this was operating fine before I upgraded from 1.8.1 to 1.8.5.

Brian

--
You received this message because you are subscribed to a t

RE: [google-appengine] Re: __setattr__ and __getattr__ causing memcacahe error in 1.8.5

2013-10-01 Thread Brian Becker
Thanks for finding that thread btw, Tim.

From: google-appengine@googlegroups.com 
[mailto:google-appengine@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 1, 2013 5:17 AM
To: google-appengine@googlegroups.com
Subject: Re: [google-appengine] Re: __setattr__ and __getattr__ causing 
memcacahe error in 1.8.5

If you look at the SO q/a you will see the problem is with the __getattr__

T

On Tuesday, October 1, 2013 6:14:53 PM UTC+8, Brian Becker wrote:
I got rid of my __getattr__ and use @property for most of them. I didn't touch 
the __setattr__ but memcache is working just fine now. Strange.

Brian

From: google-a...@googlegroups.com 
[mailto:google-a...@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 01, 2013 3:57 AM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Re: __setattr__ and __getattr__ causing 
memcacahe error in 1.8.5

You are running into basic pickle problem then,

See this question on stackoverflow 
http://stackoverflow.com/questions/2049849/why-cant-i-pickle-this-object
The OP had exactly the same error as you.

T




On Tuesday, October 1, 2013 4:51:26 PM UTC+8, Brian Becker wrote:
Neither, it is strictly a service which processes a string and spits back a 
result.


From: google-a...@googlegroups.com<mailto:google-a...@googlegroups.com> 
[mailto:google-a...@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 01, 2013 3:34 AM
To: google-a...@googlegroups.com<mailto:google-a...@googlegroups.com>
Subject: Re: [google-appengine] Re: __setattr__ and __getattr__ causing 
memcacahe error in 1.8.5

On further though I really think you are going about this the wrong way.

You haven;'t said if you using ndb or db, if you are using ndb you should be 
providing a function to validator argument that will co-erce the data for you.
Alternately subclass the Property to provide the functionality you want and not 
override __setattr__ which as you have found out could/will cause problems
with new releases of the appengine runtime, as you are not using the public api 
for models/properties.

Tim

On Tuesday, October 1, 2013 1:51:13 PM UTC+8, Brian Becker wrote:
Yes.
 def __setattr__( self, name, value ):
   if name == 'orig':
# force value to string & kill whitespace
value = unicode(value).strip()

## Lots more cleaning is necessary
# clean off ending characters
value = value.rstrip(' ,;:)(')
# Ps 3:1; cf. => Ps 3:1
if value[-3:] == 'and': value = value.replace('and','')
if value[-2:] == 'cf': value = value.replace('cf','')
# clean off ending characters again
value = value.rstrip(' ,;:)(')
self.__dict__[ 'orig'] = value

From: google-a...@googlegroups.com<mailto:google-a...@googlegroups.com> 
[mailto:google-a...@googlegroups.com] On Behalf Of timh
Sent: Tuesday, October 01, 2013 12:34 AM
To: google-a...@googlegroups.com<mailto:google-a...@googlegroups.com>
Subject: [google-appengine] Re: __setattr__ and __getattr__ causing memcacahe 
error in 1.8.5

You should show some code.  Are you actually overriding __settattr__ and 
__getattr__ in your models ?

T

On Tuesday, October 1, 2013 12:34:12 PM UTC+8, Brian Becker wrote:
After upgrading to 1.8.5 (from 1.8.1) I instantly had Internal Server Error 
whenever my class was instantiated and placed in memcache:
  daRef = oRefFinder()
  memcache.set( 'theRef', daRef)

The last lines of the error trace says that the memcache.set command:

  File "/base/data/home/apps/s~refindservice/1.370602298270267557/main.py", 
line 117, in get

memcache.set('theRef' , daRef )

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 763, in set

namespace=namespace)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 868, in _set_with_policy

time, '', namespace)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 947, in _set_multi_async_with_policy

stored_value, flags = _validate_encode_value(value, self._do_pickle)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 227, in _validate_encode_value

stored_value = do_pickle(value)

  File 
"/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py",
 line 392, in _do_pickle

pickler.dump(value)

TypeError: 'NoneType' object is not callable


I finally traced it to __setattr__ and __getattr__. If I go into my class and 
change  __seta

[google-appengine] white screen of death fixed with two main() and two if __name__ == "__main__":

2009-11-26 Thread Brian Becker
YES - I have two main() and two if __name__ == "__main__":



History:

I had the white screen of death and nothing to get it to go away. I've checked 
my code but just can't find the problem. I've verified that main() at the 
bottom of my program is executed...BUT the white screen was still there.



I know this is freaky, but I put a second main() at the top of my program and 
it FIXED the white screen of death. IT FREAKIN WORKED! No white screen of death!



I am not sure why, but for whatever reason, by the time the "redirect" takes 
place, the other application has replaced it. I have no idea, but all I can say 
is FINALLY!!

So, if anyone from AppEngine wants to look at my code and see what is going on 
and how I've fixed it by breaking it, let me know and I'll let you in. 

HERE's THE SNIPPETS:
TOP OF FILE-
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
class MainPage(webapp.RequestHandler):
  def get(self):
self.redirect('/')
application = webapp.WSGIApplication(
  [('/', MainPage)],
  debug=True)
def main():
  run_wsgi_app(application)
if __name__ == "__main__":
  main()

from google.appengine.api import users
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import db
from RefFinder import oRefFinder
import pickle,sys,urllib,cgi,tempfile,zlib,re,codecs
# reminder - use the following for temp variables:
#  each, every, cString, iCounter
class tmpFiles( db.Model ):
  info = db.BlobProperty()

900 lines of code

application = webapp.WSGIApplication([('/', mainPage),
  ('/admin/', admin),
  ('/upload/',uploadFile),
  ('/process/', processFile),
  ('/viewIndex/',viewIndex),
  ('/viewText/',viewText),
  ('/shop/',shop)
          ],
 debug=True)

def main():
  run_wsgi_app(application)

if __name__ == "__main__":
  main()





Brian Becker - br...@semo.net
President/CEO Poplar Bluff Internet, Inc.
Home of semo.net, Shelton Internet, IMS Internet, and TotallyFabricated.com

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.