hi tim,

sorry to disturb u again,i commented caching directory in twitter.py,but the
following error as
come


*File "C:\Program
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
2711, in _HandleRequest
*

base_env_dict=env_dict)

*File "C:\Program
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
380, in Dispatch
*

base_env_dict=base_env_dict)

*File "C:\Program
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1998, in Dispatch
*

self._module_dict)

*File "C:\Program
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1916, in ExecuteCGI
*

reset_modules = exec_script(handler_path, cgi_path, hook)

*File "C:\Program
Files\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1812, in ExecuteOrImportScript
*

exec module_code in script_module.__dict__

*File "D:\Projects\PythonTwitter\src\getnames.py", line 9, in <module>
*

api = twitter.Api()

*File "D:\Projects\PythonTwitter\src\twitter\twitter.py", line 888, in
__init__
*

self._cache = _FileCache()

*File "D:\Projects\PythonTwitter\src\twitter\twitter.py", line 1429, in
__init__
*

self._InitializeRootDirectory(root_directory)

*File "D:\Projects\PythonTwitter\src\twitter\twitter.py", line 1488, in
_InitializeRootDirectory
*

if not os.path.exists(root_directory):

*File "C:\Python25\lib\ntpath.py", line 255, in exists
*

st = os.stat(path)

TypeError: coercing to Unicode: need string or buffer, NoneType found
regards
venkat

On Fri, Mar 20, 2009 at 5:03 PM, Tim Hoffman <[email protected]> wrote:

>
> Hi Venkat
>
> Did you read your traceback
>
> See the line
>
> return os.path.join(tempfile.gettempdir(), cache_directory)
>
> Now go back to the docs url I included and notice it says tempfile
> module does support anything except for TemporaryFile.
>
> "tempfile is disabled, except for TemporaryFile which is aliased to
> StringIO."
>
> You will need to look at the twitter library and look at changing it
> not to use a cache (well at least a cache directory)
> or you will need to change the caching implementation (not that I have
> look at the twitter code)
> to use memcache.
>
> T
>
>
> On Mar 20, 8:21 pm, venkat rambotla <[email protected]> wrote:
> > Hi Tim.
> >
> > here is the traceback
> >
> > *File "C:\Program
> > Files\Google\google_appengine\google\appengine\tools\dev_appserver.py",
> line
> > 2711, in _HandleRequest
> > *
> >
> > base_env_dict=env_dict)
> >
> > *File "C:\Program
> > Files\Google\google_appengine\google\appengine\tools\dev_appserver.py",
> line
> > 380, in Dispatch
> > *
> >
> > base_env_dict=base_env_dict)
> >
> > *File "C:\Program
> > Files\Google\google_appengine\google\appengine\tools\dev_appserver.py",
> line
> > 1998, in Dispatch
> > *
> >
> > self._module_dict)
> >
> > *File "C:\Program
> > Files\Google\google_appengine\google\appengine\tools\dev_appserver.py",
> line
> > 1916, in ExecuteCGI
> > *
> >
> > reset_modules = exec_script(handler_path, cgi_path, hook)
> >
> > *File "C:\Program
> > Files\Google\google_appengine\google\appengine\tools\dev_appserver.py",
> line
> > 1812, in ExecuteOrImportScript
> > *
> >
> > exec module_code in script_module.__dict__
> >
> > *File "D:\Projects\PythonTwitter\src\getnames.py", line 9, in <module>
> > *
> >
> > api = twitter.Api()
> >
> > *File "D:\Projects\PythonTwitter\src\twitter\twitter.py", line 888, in
> > __init__
> > *
> >
> > self._cache = _FileCache()
> >
> > *File "D:\Projects\PythonTwitter\src\twitter\twitter.py", line 1430, in
> > __init__
> > *
> >
> > self._InitializeRootDirectory(root_directory)
> >
> > *File "D:\Projects\PythonTwitter\src\twitter\twitter.py", line 1487, in
> > _InitializeRootDirectory
> > *
> >
> > root_directory = self._GetTmpCachePath()
> >
> > *File "D:\Projects\PythonTwitter\src\twitter\twitter.py", line 1483, in
> > _GetTmpCachePath
> > *
> >
> > return os.path.join(tempfile.gettempdir(), cache_directory)
> >
> > *File "C:\Program
> > Files\Google\google_appengine\google\appengine\dist\tempfile.py", line
> 57,
> > in PlaceHolder
> > *
> >
> > raise NotImplementedError("Only tempfile.TemporaryFile is available for
> > use")
> >
> > NotImplementedError: Only tempfile.TemporaryFile is available for use
> >
> > INFO 2009-03-20 11:19:28,875 dev_appserver.py] "GET / HTTP/1.1" 500 -
> > Please Help me out
> > thanks in advance......
> >
> > regards
> > venkat
> >
>  > On Fri, Mar 20, 2009 at 4:46 PM, Tim Hoffman <[email protected]>
> wrote:
> >
> > > Venkat
> >
> > > You really need to start looking at code and docs
> > > (Also when you post errors include a little more of the traceback is
> > > more useful)
> >
> > > What you will see is that some other code (ie maybe the twitter code)
> > > will be using tempfile.NamedTemporaryFile
> > > which is not supported in the restricted python environment.
> >
> > > Have a look at
> > >http://code.google.com/appengine/docs/python/runtime.html#Pure_Python
> > > Which lists the restrictions of the python runtime
> > > and there is your answer.
> >
> > > T
> >
> > > On Mar 20, 7:15 pm, Venky <[email protected]> wrote:
> > > > Hello,
> >
> > > > Hello I am running an twiter api  application using pydev....
> >
> > > > when  iam running my application on localhost...
> >
> > > >  raise NotImplementedError("Only tempfile.TemporaryFile is available
> > > > for use") is getting displayed
> >
> > > > please help
> >
> > > > Regards
> > > > venkat.
> >
>

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

Reply via email to