Jorge/All,
One other piece of info. Tg-admin toolbox also has a similar issue as the catwalk does. It seems like it can't 'find' the project. Just to doublecheck on two basic things that may be the source of my problems:
1) Should the config files (prod.cfg and the config dir) be in a local area where I tell the user to launch from or should this be placed under sitepackages or in the egg somehow?
2) Should users be required to be in the above directory when starting the app.
yes the default is to look for dev/prod.cfg in the same dir as start-*.py
Thanks for the great help all,
Brandon
From: [email protected] [mailto: [email protected]] On Behalf Of Jorge Vargas
Sent: Monday, May 15, 2006 11:12 PM
To: [email protected]
Subject: [TurboGears] Re: EasyInstall Question on TG app deployment
On 5/15/06, Brandon Goldfedder < [EMAIL PROTECTED]> wrote:
All,
My answers/more questions below:
Brandon
From: [email protected] [mailto: [email protected]] On Behalf Of Jorge Vargas
Sent: Monday, May 15, 2006 6:50 PM
To: [email protected]
Subject: [TurboGears] Re: EasyInstall Question on TG app deployment
On 5/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
All,
Ok - figure I'm missing something basic. Goal here is to provide my TG app to others in any easy manner - although if someone has an idea on how to obscure the code it would be great...
I believe there is a flag you set that will create a pyc only egg
Do you happen to know that flag. Had trouble RTFM'ing to find it.
no I'm not that kind of person :p but Matt reply below
My problem is that using setup.py I've built my app as an egg. When I install it using easy-install it copies all to sitepackages fine. If I have a c:/myapp web area and put the config files there as well as config directory and run from there all works fine EXCEPT for catwalk.
as far as I know all the config is loaded the same way by all tg internals
Catwalk seems to want all my code in this directory as well.
error message?Error trace is:
Page handler: <bound method CatWalk.index of <turbogears.toolbox.catwalk.CatWalk object at 0x014DB430>>Traceback (most recent call last):File "c:\python24\lib\site-packages\cherrypy-2.2.1-py2.4.egg\cherrypy\_cphttptools.py", line 105, in _runself.main()File "c:\python24\lib\site-packages\cherrypy-2.2.1-py2.4.egg\cherrypy\_cphttptools.py", line 254, in mainbody = page_handler(*virtual_path, ** self.params)File "<string>", line 3, in indexFile "c:\python24\lib\site-packages\TurboGears-0.9a5-py2.4.egg\turbogears\controllers.py ", line 210, in exposeoutput = database.run_with_transaction(func._expose,func, accept, allow_json, allow_json_from_config,*args, **kw)File "c:\python24\lib\site-packages\TurboGears-0.9a5-py2.4.egg\turbogears\database.py", line 216, in run_with_transactionretval = func(*args, **kw)File "<string>", line 5, in _exposeFile "c:\python24\lib\site-packages\TurboGears-0.9a5-py2.4.egg\turbogears\controllers.py", line 230, in <lambda>func._expose.when(rule)(lambda _func, accept, allow_json, allow_json_from_config,*args,**kw: _execute_func(File "c:\python24\lib\site-packages\TurboGears- 0.9a5-py2.4.egg\turbogears\controllers.py", line 251, in _execute_funcoutput = errorhandling.try_call(func, *args, **kw)File "c:\python24\lib\site-packages\TurboGears-0.9a5-py2.4.egg\turbogears\errorhandling.py", line 71, in try_callreturn func(self, *args, **kw)File "c:\python24\lib\site-packages\TurboGears- 0.9a5-py2.4.egg\turbogears\toolbox\catwalk\__init__.py", line 1123, in indexreturn dict(models=self.models())File "c:\python24\lib\site-packages\TurboGears-0.9a5-py2.4.egg\turbogears\toolbox\catwalk\__init__.py", line 1106, in modelsreturn self.order_models(objs)File "c:\python24\lib\site-packages\TurboGears-0.9a5-py2.4.egg\turbogears\toolbox\catwalk\__init__.py", line 763, in order_modelsordered = self.load_models_order()File "c:\python24\lib\site-packages\TurboGears-0.9a5-py2.4.egg\turbogears\toolbox\catwalk\__init__.py", line 759, in load_models_orderstate = self.load_state()File "c:\python24\lib\site-packages\TurboGears-0.9a5-py2.4.egg\turbogears\toolbox\catwalk\__init__.py", line 619, in load_stateif not os.path.exists(self.state_path()): return {}File "c:\python24\lib\site-packages\TurboGears-0.9a5-py2.4.egg\turbogears\toolbox\catwalk\__init__.py", line 607, in state_pathcatwalk_session_dir =os.path.join(turbogears.util.get_package_name(),'catwalk-session')File "C:\Python24\lib\ntpath.py", line 90, in joinassert len(path) > 0TypeError: len() of unsized object
it seems to be a problem with json / jsonify I don't use catwalk so I haven't look at the code (well I did way back went it was not in TG :p) so i can't tell, maybe someone else can reply now that there is a traceback.
Any thoughts- is there a right way to externally deploy this that I'm missing?
well catwalk by default doesn't allows access from an IP diferent then localhost, if this is your problem
you need to pass in those IPs
http://trac.turbogears.org/turbogears/browser/trunk/turbogears/toolbox/catwalk/__init__.py#L99No issue on this one – accessing via localhost only. Issue is the remote test installation…
huh? if your in remote then your not localhost. is this a server? if you can ssh to that machine ... umm sorry its windows, if you can get a cmd or a remote desktop connection and run it locally there? did you try going to the machine (if you can) and run it there? or I just didn't undestand what you mean by "remote"
BTW: For doing an installation I've noticed I can't simply reference turboGears in my dependencies. I need to explicitly install it separately since I am using a6.
yes that is because TG 0.9a6 is alpha and it's not in pypi so it pulls the lastest there http://www.python.org/pypi/TurboGears/0.8.9Right now, I'm doing this via web install off the preview/download/index.html site (which is a bit dangerous)
why?
I haven't found a way to get it to take all the eggs locally instead so am requiring an internet connection as well…
- download all the .egg files
- zip them if you want
- move them to your server
- unzip (make sure they are all in the same directory
- run easy_install -f . TurboGears (note there is a dot that is look for eggs in . which if you don't know is current directory)
NOTE: if you have an older version you may need -U
Thanks again for assistance,
sure np
Brandon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

