question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dallinger sandbox/eploy fails: KeyError: 'heroku_app_id_root is not a valid configuration key'

See original GitHub issue

Dallinger sandbox fails because of the new heroku_app_id_root Here is the error from the paper trail:

0x7fab6c92b9b0; Participant> to <Mapper at 0x7fab5c708860; Participant>: Check for duplicate use of 'participant' as value for polymorphic_identity.
Jul 27 15:22:26 dlgr-rp6 app/clock.1   self.polymorphic_identity,
Jul 27 15:22:26 dlgr-rp6 app/clock.1 Traceback (most recent call last):
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/.heroku/python/bin/dallinger_heroku_clock", line 8, in <module>
Jul 27 15:22:26 dlgr-rp6 app/clock.1     sys.exit(main())
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/.heroku/python/lib/python3.7/site-packages/dallinger_scripts/clock.py", line 4, in main
Jul 27 15:22:26 dlgr-rp6 app/clock.1     launch()
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/.heroku/python/lib/python3.7/site-packages/dallinger/heroku/clock.py", line 48, in launch
Jul 27 15:22:26 dlgr-rp6 app/clock.1     config.load()
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/.heroku/python/lib/python3.7/site-packages/dallinger/config.py", line 244, in load
Jul 27 15:22:26 dlgr-rp6 app/clock.1     self.register_extra_parameters()
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/.heroku/python/lib/python3.7/site-packages/dallinger/config.py", line 270, in register_extra_parameters
Jul 27 15:22:26 dlgr-rp6 app/clock.1     from dallinger_experiment.experiment import extra_parameters
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/experiment.py", line 145, in <module>
Jul 27 15:22:26 dlgr-rp6 app/clock.1     extra_routes = Exp().extra_routes()
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/experiment.py", line 142, in __init__
Jul 27 15:22:26 dlgr-rp6 app/clock.1     super().__init__(session)
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/.heroku/src/psynet/psynet/experiment.py", line 68, in __init__
Jul 27 15:22:26 dlgr-rp6 app/clock.1     config.load()
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/.heroku/python/lib/python3.7/site-packages/dallinger/config.py", line 261, in load
Jul 27 15:22:26 dlgr-rp6 app/clock.1     self.load_from_file(localConfig)
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/.heroku/python/lib/python3.7/site-packages/dallinger/config.py", line 223, in load_from_file
Jul 27 15:22:26 dlgr-rp6 app/clock.1     self.extend(data, cast_types=True, strict=True)
Jul 27 15:22:26 dlgr-rp6 app/clock.1   File "/app/.heroku/python/lib/python3.7/site-packages/dallinger/config.py", line 118, in extend
Jul 27 15:22:26 dlgr-rp6 app/clock.1     raise KeyError("{} is not a valid configuration key".format(key))
Jul 27 15:22:26 dlgr-rp6 app/clock.1 KeyError: 'heroku_app_id_root is not a valid configuration key'
Jul 27 15:36:24 dlgr-rp6 app/clock.1 /app/.heroku/python/lib/python3.7/site-packages/sqlalchemy/orm/mapper.py:1100: SAWarning: Reassigning polymorphic association for identity 'participant' from <Mapper at 0x7fafecf22a20; Participant> to <Mapper at 0x7fafdccfd978; Participant>: Check for duplicate use of 'participant' as value for polymorphic_identity.

here is what the command line shows:

Scaling up the dynos...
Scaling dynos... done, now running web at 1:Performance-M
Scaling dynos... done, now running worker at 1:Performance-M
Scaling dynos... done, now running clock at 1:Performance-M
❯❯ Launching the experiment on the remote server and starting recruitment...
Calling https://dlgr-rp6.herokuapp.com/launch
❯❯ Error parsing response from https://dlgr-rp6.herokuapp.com/launch, check web dyno logs for details: <!DOCTYPE html>
	<html>
	 <head>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta charset="utf-8">
		<title>Application Error</title>
		<style media="screen">
		 html,body,iframe {
			margin: 0;
			padding: 0;
		 }
		 html,body {
			height: 100%;
			overflow: hidden;
		 }
		 iframe {
			width: 100%;
			height: 100%;
			border: 0;
		 }
		</style>
	 </head>
	 <body>
		<iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe>
	 </body>
	</html>
Traceback (most recent call last):
 File "/Users/ofer/.virtualenvs/d6/bin/dallinger", line 33, in <module>
  sys.exit(load_entry_point('dallinger', 'console_scripts', 'dallinger')())
 File "/Users/ofer/.virtualenvs/d6/lib/python3.8/site-packages/click/core.py", line 722, in __call__
  return self.main(*args, **kwargs)
 File "/Users/ofer/.virtualenvs/d6/lib/python3.8/site-packages/click/core.py", line 697, in main
  rv = self.invoke(ctx)
 File "/Users/ofer/.virtualenvs/d6/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
  return _process_result(sub_ctx.command.invoke(sub_ctx))
 File "/Users/ofer/.virtualenvs/d6/lib/python3.8/site-packages/click/core.py", line 895, in invoke
  return ctx.invoke(self.callback, **ctx.params)
 File "/Users/ofer/.virtualenvs/d6/lib/python3.8/site-packages/click/core.py", line 535, in invoke
  return callback(*args, **kwargs)
 File "/Users/ofer/Dallinger/dallinger/command_line.py", line 359, in wrapper
  return f(**kwargs)
 File "/Users/ofer/Dallinger/dallinger/command_line.py", line 131, in wrapper
  result = func(*args, **kwargs)
 File "/Users/ofer/Dallinger/dallinger/command_line.py", line 473, in sandbox
  _deploy_in_mode("sandbox", app=app, verbose=verbose, log=log)
 File "/Users/ofer/Dallinger/dallinger/deployment.py", line 609, in _deploy_in_mode
  deploy_sandbox_shared_setup(log, verbose=verbose, app=app)
 File "/Users/ofer/Dallinger/dallinger/deployment.py", line 568, in deploy_sandbox_shared_setup
  launch_data = _handle_launch_data(launch_url, error=log)
 File "/Users/ofer/Dallinger/dallinger/deployment.py", line 405, in _handle_launch_data
  launch_data = launch_request.json()
 File "/Users/ofer/.virtualenvs/d6/lib/python3.8/site-packages/requests/models.py", line 897, in json
  return complexjson.loads(self.text, **kwargs)
 File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/__init__.py", line 357, in loads
  return _default_decoder.decode(s)
 File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 337, in decode
  obj, end = self.raw_decode(s, idx=_w(s, 0).end())
 File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/json/decoder.py", line 355, in raw_decode
  raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
(d6) Ofers-MBP-5:rhythm-rating ofer$

We currently have one app live that show the issue: dlgr-rp6 you have access to it via the group credentials.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
alecpmcommented, Jul 27, 2020

Is is possible that you launched the experiment with Dallinger master but the experiment requires 6.3.1 or older? If so, could you try setting the dallinger pin in your experiment requirements.txt to -e git://github.com/Dallinger/Dallinger.git@master#egg=dallinger

0reactions
jacobyncommented, Jul 28, 2020

Closing the issue. The problem was the local dallinger version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fails to start with KeyError: WERKZEUG_SERVER_FD #425
Describe the bug gdbgui does not start. It fails with KeyError: WERKZEUG_SERVER_FD. To Reproduce pipx install gdbgui gdbgui I get this ...
Read more >
Key error when feeding the training corpus to ... - Stack Overflow
KeyError : "Invalid key: slice(0, 1000, None). Please first select a split. For example: `my_dataset_dictionary['train'][slice(0, 1000, ...
Read more >
Python errors and exceptions
Inside this function, the program encountered an error on Line 7, when it tried to run the code print ice_creams[3] . Long tracebacks....
Read more >
KEY ERROR on yalm file for searchtweets - Premium APIs v1.1
I am trying to set up searchtweets with premium sandbox I created a yalm file that looks like this search_tweets_api: account_type: premium ...
Read more >
KeyError when enumerating over dataloader - PyTorch Forums
When enumerating over dataloaders I get the following error: Traceback (most recent call last): File “train.py”, line 218, in
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found