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

Run Server alias fails on working install #54

Open
daredoes opened this issue Jan 25, 2017 · 5 comments
Open

Run Server alias fails on working install #54

daredoes opened this issue Jan 25, 2017 · 5 comments

Comments

@daredoes
Copy link

daredoes commented Jan 25, 2017

Hey Eli, looking for some help here. I'm working on getting sideboard functional for a school project.

(env) vagrant@vagrant-ubuntu-trusty-64:~/uber/sideboard$ run_server
Traceback (most recent call last):
  File "/home/vagrant/uber/sideboard/sideboard/run_server.py", line 5, in <module>
    import sideboard.server
  File "/home/vagrant/uber/sideboard/sideboard/server.py", line 207, in <module>
    cherrypy.tree.mount(Root(), '', app_config)
  File "/home/vagrant/uber/sideboard/sideboard/server.py", line 202, in mount
    assert script_name not in cherrypy.tree.apps, '{} has already been mounted, probably by another plugin'.format(script_name)
AssertionError:  has already been mounted, probably by another plugin

This error pops up whenever I execute run_server.py.

I've had a few other errors, but I've been working my way around them.

EDIT:

More info:
This is the state of cherrypy.tree.apps when the assert fails.

{u'': cherrypy._cptree.Application(<sideboard.server.Root object at 0x7fcda7c06190>, u'')}

and it appears that the script_name its searching for is hardcoded to be ""

@binary1230
Copy link
Contributor

search for all cherrypy.tree.mount() calls in your code, the second argument to that function needs to be unique in all instances. paste in any calls to that here for further diagnosis

@daredoes
Copy link
Author

I've done a search through all files in Path. This is the only one I can find executing. It goes run_server -> import server.py -> error

@binary1230
Copy link
Contributor

can you find out if it's calling cherrypy.tree.mount() twice somehow? debugger? print statements?

@daredoes
Copy link
Author

AGH. run_server.py was importing sideboard.server or server.py which would then trigger init.py which called import sideboard.server which would double trigger the application mounting. Now I've got that understood, but I've hit a new level of weird where the logger has just turned itself off.

@EliAndrewC
Copy link
Contributor

Sorry it's been a crazy week so I'm behind on Github issues and PRs. One general note: if possible you should try using the resyncing_with_public branch of this Sideboard repo, which has a lot of new features and a few bugfixes. In particular, while it wouldn't have stopped this from happening in the first place, I believe you'd have gotten a slightly less confusing error message.

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