Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Setting up 0.6

39 views
Skip to first unread message

Henrik Härkönen

unread,
Aug 5, 2020, 1:27:42 PM8/5/20
to Nagare users
Hi Alain!

Some another "new user OOBE issues" with setting up the 0.6:

The tutorial in the web page tells to use command

nagare-admin create-app tutorial

but seems there is no such command anymore. I then found and installed the module
'commands-app-create' and then used nagare-admin app create tutorial but the response was

No module named 'nagare.templates

So I presume there is some package that has the templates, but perhaps not published yet? The commands-app-create package has a reference:


but that repository gives 404.

-Henrik

apoirier

unread,
Aug 5, 2020, 4:43:58 PM8/5/20
to Nagare users
The lack of proper documentation is why version 0.6 is not yet published on Pypi.

Here is a port of the simple counter example of Nagare 0.5 tutorial part 2 and 3.

Into the 'examples-counter' directory, register the application with 'pip install -e .' then launch it with 'nagare-admin app serve counter/conf/counter.cfg'

Hope that will help you to start,

Alain
examples-counter.tgz

Henrik Härkönen

unread,
Aug 6, 2020, 9:22:48 AM8/6/20
to nagare...@googlegroups.com
Alright! Installing the session manager and publisher, and then installing that example app and running it with

nagare-admin app serve examples-counter/counter/conf/counter.cfg

did the trick, thanks!

-Henrik

--
You received this message because you are subscribed to a topic in the Google Groups "Nagare users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/nagare-users/GPxwZ2483OA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to nagare-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nagare-users/febd40be-5e9a-4519-b6dd-7d254d3aff4do%40googlegroups.com.

Henrik Härkönen

unread,
Aug 13, 2020, 7:57:21 AM8/13/20
to Nagare users

Henrik Härkönen

unread,
Aug 13, 2020, 8:21:39 AM8/13/20
to Nagare users
Btw,

I cannot find the --reload option for the serve command. How can I activate the hot-reload? I tried to install the app in development mode by runnint setup.py with "develop" option.


-Henrik

apoirier

unread,
Aug 13, 2020, 8:26:12 AM8/13/20
to Nagare users
To install your application in development mode with 'pip' : pip install -e <application directory>

To activate automatic reloading, just install the 'nagare-services-reloader' service

Henrik Härkönen

unread,
Aug 13, 2020, 8:28:55 AM8/13/20
to nagare...@googlegroups.com
Ah, a separate package for that, of course! Thanks!

You received this message because you are subscribed to the Google Groups "Nagare users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nagare-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nagare-users/9fab74dc-cd15-4470-84ca-727b741431d8o%40googlegroups.com.

Henrik Härkönen

unread,
Aug 13, 2020, 8:41:50 AM8/13/20
to Nagare users
Now I get it to reload, but when changing the counter.py file, and the reloading triggers, the following stacktrace appears:

(venv) henrik:~/dev/nagare/examples-counter/counter/conf$ nagare-admin app serve examples-counter/counter/conf/counter.cfg
2020-08-13 15:38:20,764 - INFO - nagare.publishers.gunicorn - Serving application `counter` on http://127.0.0.1:8080
2020-08-13 15:38:20,767 - INFO - nagare.publishers.gunicorn.worker - Starting gunicorn 20.0.4
2020-08-13 15:38:20,801 - INFO - nagare.publishers.gunicorn.worker - Listening at: http://127.0.0.1:8080 (21491)
2020-08-13 15:38:20,801 - INFO - nagare.publishers.gunicorn.worker - Using worker: gthread
2020-08-13 15:38:20,816 - INFO - nagare.publishers.gunicorn.worker - Booting worker with pid: 21495
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/home/henrik/.pyenv/versions/stackless-3.7.5/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    self.run()
  File "/home/henrik/dev/nagare/venv/lib/python3.7/site-packages/watchdog/observers/api.py", line 203, in run
    self.dispatch_events(self.event_queue, self.timeout)
  File "/home/henrik/dev/nagare/venv/lib/python3.7/site-packages/watchdog/observers/api.py", line 376, in dispatch_events
    handler.dispatch(event)
  File "/home/henrik/dev/nagare/venv/lib/python3.7/site-packages/nagare/services/reloader.py", line 101, in dispatch
    mtime2 = os.stat(filename).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/home/henrik/dev/nagare/examples-counter/counter/counter.py'

apoirier

unread,
Aug 13, 2020, 10:28:10 AM8/13/20
to Nagare users
Can you update and try 'nagare-services-reloader' now?

Henrik Härkönen

unread,
Aug 13, 2020, 12:02:22 PM8/13/20
to Nagare users
Now it works, thank you for the fix! :)

-H
Reply all
Reply to author
Forward
0 new messages