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

Failed to load application: 'NoneType' object has no attribute 'get' #2

Closed
ghost opened this issue May 27, 2014 · 4 comments
Closed

Comments

@ghost
Copy link

ghost commented May 27, 2014

From chrisjcox8 on March 20, 2010 00:31:22

After running ./start.sh, kippo exits with "Failed to load application:
'NoneType' object has no attribute 'get'." I've been able to reproduce this
issue on two Linux distributions, output is almost identical.

Debian Lenny 5.0.4
Python 2.5.2
Twisted 8.1.0
PyCrypto 2.0.1
Zope Interface 3.3.1

Ubuntu Karmic Koala 9.10
Python 2.6.4
Twisted 8.2.0
PyCrypto 2.0.1
Zope Interface 3.5.2

Debian output:

$ ./start.sh
Starting kippo in background...Traceback (most recent call last):
File "/usr/lib/python2.5/site-packages/twisted/application/app.py", line
614, in run
runApp(config)
File "/usr/lib/python2.5/site-packages/twisted/scripts/twistd.py", line
23, in runApp
_SomeApplicationRunner(config).run()
File "/usr/lib/python2.5/site-packages/twisted/application/app.py", line
330, in run
self.application = self.createOrGetApplication()
File "/usr/lib/python2.5/site-packages/twisted/application/app.py", line
416, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- ---
File "/usr/lib/python2.5/site-packages/twisted/application/app.py", line
427, in getApplication
application = service.loadApplication(filename, style, passphrase)
File "/usr/lib/python2.5/site-packages/twisted/application/service.py",
line 368, in loadApplication
application = sob.loadValueFromFile(filename, 'application', passphrase)
File "/usr/lib/python2.5/site-packages/twisted/persisted/sob.py", line
214, in loadValueFromFile
exec fileObj in d, d
File "kippo.tac", line 20, in
factory.portal = portal.Portal(honeypot.HoneyPotRealm())
File "/tmp/kippo-0.4/kippo/core/honeypot.py", line 278, in init
self.env = HoneyPotEnvironment()
File "/tmp/kippo-0.4/kippo/core/honeypot.py", line 271, in init
self.cfg.get('honeypot', 'filesystem_file')))
exceptions.AttributeError: 'NoneType' object has no attribute 'get'

Failed to load application: 'NoneType' object has no attribute 'get'

Ubuntu output:

$ ./start.sh
Starting kippo in background.../tmp/kippo-0.4/kippo/commands/ping.py:6:
DeprecationWarning: the md5 module is deprecated; use hashlib instead
import time, re, random, md5
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py", line
694, in run
runApp(config)
File "/usr/lib/python2.6/dist-packages/twisted/scripts/twistd.py", line
23, in runApp
_SomeApplicationRunner(config).run()
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py", line
411, in run
self.application = self.createOrGetApplication()
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py", line
494, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- ---
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py", line
505, in getApplication
application = service.loadApplication(filename, style, passphrase)
File "/usr/lib/python2.6/dist-packages/twisted/application/service.py",
line 390, in loadApplication
application = sob.loadValueFromFile(filename, 'application', passphrase)
File "/usr/lib/python2.6/dist-packages/twisted/persisted/sob.py", line
215, in loadValueFromFile
exec fileObj in d, d
File "kippo.tac", line 20, in
factory.portal = portal.Portal(honeypot.HoneyPotRealm())
File "/tmp/kippo-0.4/kippo/core/honeypot.py", line 278, in init
self.env = HoneyPotEnvironment()
File "/tmp/kippo-0.4/kippo/core/honeypot.py", line 271, in init
self.cfg.get('honeypot', 'filesystem_file')))
exceptions.AttributeError: 'NoneType' object has no attribute 'get'

Failed to load application: 'NoneType' object has no attribute 'get'

Although not advised, I attempted to execute kippo with super user
privileges under Ubuntu. If it's of any use, I have also included the output:

$ sudo ./start.sh
[sudo] password for ******:
Starting kippo in background...Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py", line
694, in run
runApp(config)
File "/usr/lib/python2.6/dist-packages/twisted/scripts/twistd.py", line
23, in runApp
_SomeApplicationRunner(config).run()
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py", line
411, in run
self.application = self.createOrGetApplication()
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py", line
494, in createOrGetApplication
application = getApplication(self.config, passphrase)
--- ---
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py", line
505, in getApplication
application = service.loadApplication(filename, style, passphrase)
File "/usr/lib/python2.6/dist-packages/twisted/application/service.py",
line 390, in loadApplication
application = sob.loadValueFromFile(filename, 'application', passphrase)
File "/usr/lib/python2.6/dist-packages/twisted/persisted/sob.py", line
215, in loadValueFromFile
exec fileObj in d, d
File "kippo.tac", line 16, in
from kippo.core import honeypot
exceptions.ImportError: No module named kippo.core

Failed to load application: No module named kippo.core

Original issue: http://code.google.com/p/kippo/issues/detail?id=2

@ghost
Copy link
Author

ghost commented May 27, 2014

From desaster on March 29, 2010 23:47:04

It seems the file kippo.cfg doesn't exist. Fix this by doing:

cp kippo.cfg.dist kippo.cfg

kippo.cfg.dist should only exist in the svn repository, and the release should ship
with kippo.cfg. I shall do this right in the next release.

Status: Accepted

@ghost
Copy link
Author

ghost commented May 27, 2014

From chrisjcox8 on March 30, 2010 11:32:40

Looks like you are right, I needed a config file. My apologies.

Would it also be possible to test for a config file and return an appropriate error
before failing?

os.path.isfile('kippo.cfg')

Thanks, problem fixed.

@ghost
Copy link
Author

ghost commented May 27, 2014

From rafael.torrales on October 30, 2010 11:08:30

Same problem, same solution.

@ghost
Copy link
Author

ghost commented May 27, 2014

From desaster on January 13, 2011 00:00:02

New release comes with a properly renamed kippo.cfg, so I'm closing the issue

Status: Fixed

@ghost ghost closed this as completed May 27, 2014
grutz pushed a commit to grutz/kippo that referenced this issue May 4, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants