Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: KeyError: 'show ; just print' #34

Open
yifans opened this issue Nov 27, 2018 · 3 comments
Open

error: KeyError: 'show ; just print' #34

yifans opened this issue Nov 27, 2018 · 3 comments

Comments

@yifans
Copy link

yifans commented Nov 27, 2018

I built recsync on EPICS 7.0.2, Anaconda3-5.3.1 and CentOS7.
The client woks well. However, I found some errors when I started the server.

[yifans@ server] $ ls
cf.conf  demo.conf  MANIFEST.in  README  recceiver  recceiver.sqlite3  setup.py  twisted
[yifans@ server] $ sqlite3 test.db -init recceiver.sqlite3 .exit
-- Loading resources from recceiver.sqlite3
[yifans@ server] $ export PYTHONPATH=.
[yifans@ server] $ twistd -r poll -n recceiver -f demo.conf
Traceback (most recent call last):
  File "/home/yifans/anaconda3/bin/twistd", line 11, in <module>
    sys.exit(run())
  File "/home/yifans/anaconda3/lib/python3.7/site-packages/twisted/scripts/twistd.py", line 31, in run
    app.run(runApp, ServerOptions)
  File "/home/yifans/anaconda3/lib/python3.7/site-packages/twisted/application/app.py", line 674, in run
    runApp(config)
  File "/home/yifans/anaconda3/lib/python3.7/site-packages/twisted/scripts/twistd.py", line 25, in runApp
    runner.run()
  File "/home/yifans/anaconda3/lib/python3.7/site-packages/twisted/application/app.py", line 381, in run
    self.application = self.createOrGetApplication()
  File "/home/yifans/anaconda3/lib/python3.7/site-packages/twisted/application/app.py", line 448, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/home/yifans/hals/epics/software/recsync/server/recceiver/application.py", line 112, in makeService
    ctrl = ProcessorController(cfile=opts['config'])
  File "/home/yifans/hals/epics/software/recsync/server/recceiver/processors.py", line 89, in __init__
    plug = plugs[plugname]
KeyError: 'show ; just print'
[yifans@ server] $ twistd --version
twistd (the Twisted daemon) 18.7.0
Copyright (c) 2001-2018 Twisted Matrix Laboratories.
See LICENSE for details.
@shroffk
Copy link
Collaborator

shroffk commented Nov 27, 2018

hello this looks like an error in the demo.conf

can you replace line 30
procs = show ; just print
with
procs = show

@yifans
Copy link
Author

yifans commented Nov 28, 2018

I replaced the line 30, but there were still errors.
This is the output.

[yifans@ server] $ twistd -r poll -n recceiver -f demo.conf
Traceback (most recent call last):
  File "/home/yifans/anaconda3/bin/twistd", line 11, in <module>
    sys.exit(run())
  File "/home/yifans/anaconda3/lib/python3.6/site-packages/twisted/scripts/twistd.py", line 31, in run
    app.run(runApp, ServerOptions)
  File "/home/yifans/anaconda3/lib/python3.6/site-packages/twisted/application/app.py", line 674, in run
    runApp(config)
  File "/home/yifans/anaconda3/lib/python3.6/site-packages/twisted/scripts/twistd.py", line 25, in runApp
    runner.run()
  File "/home/yifans/anaconda3/lib/python3.6/site-packages/twisted/application/app.py", line 381, in run
    self.application = self.createOrGetApplication()
  File "/home/yifans/anaconda3/lib/python3.6/site-packages/twisted/application/app.py", line 448, in createOrGetApplication
    ser = plg.makeService(self.config.subOptions)
  File "/home/yifans/hals/epics/software/recsync/server/recceiver/application.py", line 112, in makeService
    ctrl = ProcessorController(cfile=opts['config'])
  File "/home/yifans/hals/epics/software/recsync/server/recceiver/processors.py", line 89, in __init__
    plug = plugs[plugname]
KeyError: 'show'

This is my demo.conf (uncomment the loglevel, addrlist and change the procs)

[yifans@ server] $ cat demo.conf 
# run with
#twistd -n recceiver -f <thisfile>.conf

[recceiver]

# Logging detail level.  Use python logging level name.
loglevel = WARN

# list of broadcast addresses.
# default
#addrlist = 255.255.255.255:5049
# for local testing w/ firewall
addrlist = 127.255.255.255:5049

# Processing chain
# sequence of plugin names seperated by ','
#
# Plugin names may be followed by an instance name (eg. "db:arbitrary")
# which allows for more than one instance of a plugin with different
# configuration
#
# Default plugins
#  show - Prints information to daemon log
#  db   - Stores in sqlite3 database
#
# eg. print and store in database.  Database config from section "[lite]"
# Show config from "[show]" although show has no options at present.
##procs = show, db:lite

procs = show
#procs = show ; just print

# Time interval for sending recceiver advertisments
#announceInterval = 15.0

# Idle Timeout for TCP connections.
#tcptimeout = 15.0

# Time to wait before commiting updates
# Doesn't effect IOC clients
#commitInterval = 5.0

# Maximum concurrent "active" clients
# to allow.
#maxActive = 20

[lite]  # example of "db" plugin config
# Database access module
dbtype = sqlite3

# DB name
#  filename for sqlite3
dbname = test.db

# Accessor ID key
# Allows multiple server daemons to share a common database.
# Must be unique for each instance accessing
# a common database.
idkey = 42

[cf]
# cf-store application

# Debug output file location.
# Produces no file when not defined.
# debug_file_loc = /home/devuser/recsyncdata.txt

@tanviash
Copy link
Contributor

tanviash commented Dec 20, 2018

@yifans Were you able to resolve this problem or is it still there? I see the same issue on Debian Stretch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants