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

ipengine throws KeyError: url #2304

Closed
jankatins opened this issue Aug 14, 2012 · 5 comments
Closed

ipengine throws KeyError: url #2304

jankatins opened this issue Aug 14, 2012 · 5 comments
Milestone

Comments

@jankatins
Copy link
Contributor

c:\Neuinstall\ipython>ipengine --log-to-file --log-level=DEBUG --ip=192.168.181.26 --port=54691 --profile=laptop --ipython-dir=%CD%
2012-08-14 19:25:29,648.648 [IPEngineApp] IPYTHONDIR set to: c:\Neuinstall\ipython
2012-08-14 19:25:29,664.664 [IPEngineApp] Config changed:
2012-08-14 19:25:29,664.664 [IPEngineApp] {'EngineFactory': {'regport': 54691, 'ip': u'192.168.181.26'}, 'IPEngineApp': {'profile': u'laptop', 'log_level': u'DEBUG', 'ipython_dir': u'c:\\Neuinstall\\ipython', 'log_to_file': True}}
2012-08-14 19:25:29,664.664 [IPEngineApp] Using existing profile dir: u'c:\\Neuinstall\\ipython\\profile_laptop'
2012-08-14 19:25:29,664.664 [IPEngineApp] Searching path [u'c:\\Neuinstall\\ipython', u'c:\\Neuinstall\\ipython\\profile_laptop'] for config files
2012-08-14 19:25:29,664.664 [IPEngineApp] Attempting to load config file: ipython_config.py
2012-08-14 19:25:29,680.680 [IPEngineApp] Loaded config file: c:\Neuinstall\ipython\profile_laptop\ipython_config.py
2012-08-14 19:25:29,680.680 [IPEngineApp] Attempting to load config file: ipengine_config.py
2012-08-14 19:25:29,680.680 [IPEngineApp] Config file not found, skipping: ipengine_config.py
Traceback (most recent call last):
  File "C:\portabel\Python27\Scripts\ipengine-script.py", line 9, in <module>
    load_entry_point('ipython==0.14.dev', 'console_scripts', 'ipengine')()
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPytho
n\parallel\apps\ipengineapp.py", line 371, in launch_new_instance
    app.initialize()
  File "<string>", line 2, in initialize
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPytho
n\config\application.py", line 84, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPytho
n\parallel\apps\ipengineapp.py", line 357, in initialize
    self.init_engine()
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPytho
n\parallel\apps\ipengineapp.py", line 300, in init_engine
    self.load_connector_file()
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPytho
n\parallel\apps\ipengineapp.py", line 222, in load_connector_file
    d['url'] = disambiguate_url(d['url'], config.EngineFactory.location)
KeyError: 'url'

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    c.Application.verbose_crash=True

Same when specifiying a --url parameter:

c:\Neuinstall\ipython>ipengine --log-to-file --log-level=DEBUG --profile=laptop --ipython-dir=%CD% --url='tcp://192.168.181.26:54691
2012-08-14 19:41:06,509.509 [IPEngineApp] IPYTHONDIR set to: c:\Neuinstall\ipython
2012-08-14 19:41:06,509.509 [IPEngineApp] Config changed:
2012-08-14 19:41:06,509.509 [IPEngineApp] {'EngineFactory': {'url': u"'tcp://192.168.181.26:54691"}, 'IPEngineApp': {'profile': u'laptop', 'log_level': u'DEBUG', 'ipython_dir': u'c:\\Neuinstall\\ipyth
on', 'log_to_file': True}}
2012-08-14 19:41:06,509.509 [IPEngineApp] Using existing profile dir: u'c:\\Neuinstall\\ipython\\profile_laptop'
2012-08-14 19:41:06,509.509 [IPEngineApp] Searching path [u'c:\\Neuinstall\\ipython', u'c:\\Neuinstall\\ipython\\profile_laptop'] for config files
2012-08-14 19:41:06,509.509 [IPEngineApp] Attempting to load config file: ipython_config.py
2012-08-14 19:41:06,525.525 [IPEngineApp] Loaded config file: c:\Neuinstall\ipython\profile_laptop\ipython_config.py
2012-08-14 19:41:06,525.525 [IPEngineApp] Attempting to load config file: ipengine_config.py
2012-08-14 19:41:06,525.525 [IPEngineApp] Config file not found, skipping: ipengine_config.py
Traceback (most recent call last):
  File "C:\portabel\Python27\Scripts\ipengine-script.py", line 9, in <module>
    load_entry_point('ipython==0.14.dev', 'console_scripts', 'ipengine')()
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPython\parallel\apps\ipengineapp.py", line 371, in launch_new_instance
    app.initialize()
  File "<string>", line 2, in initialize
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPython\config\application.py", line 84, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPython\parallel\apps\ipengineapp.py", line 357, in initialize
    self.init_engine()
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPython\parallel\apps\ipengineapp.py", line 300, in init_engine
    self.load_connector_file()
  File "C:\portabel\Python27\lib\site-packages\ipython-0.14.dev-py2.7.egg\IPython\parallel\apps\ipengineapp.py", line 222, in load_connector_file
    d['url'] = disambiguate_url(d['url'], config.EngineFactory.location)
KeyError: 'url'

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    c.Application.verbose_crash=True

Same happens from ipcluster engine

Version is git from today.

@minrk
Copy link
Member

minrk commented Aug 14, 2012

The solution here is probably just to remove the url option. Connection files are the way to propagate connection info.

Can I ask why you are specifying the ip/port on the command-line?

@bfroehle
Copy link
Contributor

Unfortunately I don't think you are actually using the git version from today, as I don't see any mention of disambiguate_url in ipengineapp.py

In particular, the line you mentioned disappeared in a70d89c many months ago.

I'm going to close this issue. Please re-open if you can reproduce under the current master or version 0.13. Since @minrk has a question, I'm going to let this stay open for now.

@minrk
Copy link
Member

minrk commented Aug 14, 2012

Thanks, @bfroehle. @JanSchulz, can you post the output of import IPython; print IPython.sys_info()?

@jankatins
Copy link
Contributor Author

Thanks a lot, the problem was that my python install had several versions of ipython installed (from 0.12 to several 14.dev versions installed via egg and *.exe). After deleting every ipython file under \lib\site-packages and \scripts and reinstalling a new version I was able to connect the engine to the controller.

Re: the question about ip / port: its in the examples:

ipengine --help:
[...]
Examples
--------

    ipengine --ip=192.168.0.1 --port=1000     # connect to hub at ip and port
    ipengine --log-to-file --log-level=DEBUG  # log to a file with DEBUG verbosi

Re the ipython version: Funnily the above command showed a new commit (before deleting everything and with a still broken ipengine):

C:\Neuinstall\ipython>python -c "import IPython; print IPython.sys_info()"
{'commit_hash': '06a7a57',
 'commit_source': 'installation',
 'default_encoding': 'cp1252',
 'ipython_path': 'C:\\portabel\\Python27\\lib\\site-packages\\IPython',
 'ipython_version': '0.14.dev',
 'os_name': 'nt',
 'platform': 'Windows-7-6.1.7601-SP1',
 'sys_executable': 'C:\\portabel\\Python27\\python.exe',
 'sys_platform': 'win32',
 'sys_version': '2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]'}

The *.exe seems to get a different version of the ipython...

Thanks again for your fast help!

@takluyver
Copy link
Member

Glad it got solved. I don't think there's anything we need to do here, so I'm closing the issue.

@minrk minrk added this to the no action milestone Mar 26, 2014
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

4 participants