Discussion:
[TurboGears] "gearbox serve --reload" doesnt reload
a***@gmail.com
2017-04-15 13:54:05 UTC
Permalink
Hi

I'm using Tg2.3.9 on a Ubuntu 16.04.02 machine

I can run "gearbox serve --reload" and serve my project without a problem.
I get "*INFO [gearbox] Starting subprocess with file monitor*"
But the --reload option doesn't function as expected
When I save a file in my project directory, say "root.py", nothing happens.

I'm testing things to look for a solution, I found that when I change and
save this file (or others in the gearbox path)
"/home/USERNAME/.virtualenvs/ENVNAME/local/lib/python2.7/site-packages/gearbox/__init__.py"

The reload function works, and the project is reloaded

What can I do?

Thanks for the help
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
Alessandro Molina
2017-04-15 22:28:40 UTC
Permalink
--reload option monitors for any change to modules in sys.modules so
changing any loaded module should trigger a reload.

Are you sure you are actually serving the application from the files you
are modifying?
Most common case for this is installing the application with ``setup.py
install`` instead of ``setup.py develop`` which ends up creating a
different copy of the application.
Post by a***@gmail.com
Hi
I'm using Tg2.3.9 on a Ubuntu 16.04.02 machine
I can run "gearbox serve --reload" and serve my project without a problem.
I get "*INFO [gearbox] Starting subprocess with file monitor*"
But the --reload option doesn't function as expected
When I save a file in my project directory, say "root.py", nothing happens.
I'm testing things to look for a solution, I found that when I change and
save this file (or others in the gearbox path)
"/home/USERNAME/.virtualenvs/ENVNAME/local/lib/python2.7/
site-packages/gearbox/__init__.py"
The reload function works, and the project is reloaded
What can I do?
Thanks for the help
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
אלון פלגי
2017-04-28 10:03:37 UTC
Permalink
I guess I forgot to use "python setup.py develop"
I started over, cloned my git repo again, installed everything, used
"python setup.py develop" and everything works as expected

Thanks for the help
Post by Alessandro Molina
--reload option monitors for any change to modules in sys.modules so
changing any loaded module should trigger a reload.
Are you sure you are actually serving the application from the files you
are modifying?
Most common case for this is installing the application with ``setup.py
install`` instead of ``setup.py develop`` which ends up creating a
different copy of the application.
Post by a***@gmail.com
Hi
I'm using Tg2.3.9 on a Ubuntu 16.04.02 machine
I can run "gearbox serve --reload" and serve my project without a problem.
I get "*INFO [gearbox] Starting subprocess with file monitor*"
But the --reload option doesn't function as expected
When I save a file in my project directory, say "root.py", nothing happens.
I'm testing things to look for a solution, I found that when I change and
save this file (or others in the gearbox path)
"/home/USERNAME/.virtualenvs/ENVNAME/local/lib/python2.7/sit
e-packages/gearbox/__init__.py"
The reload function works, and the project is reloaded
What can I do?
Thanks for the help
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the
Google Groups "TurboGears" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/turbogears/T1q-XZZ6TyU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
--
*אלון*
--
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email to turbogears+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
Visit this group at https://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.
Loading...