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

Unable to test PostgreSQL access from Python/Twisted-based WAMP example #271

Closed
antonymott opened this issue Mar 18, 2015 · 1 comment
Closed

Comments

@antonymott
Copy link
Contributor

Followed the guide: http://crossbar.io/docs/Database-Programming-with-PostgreSQL/ using psycopg2 as database driver.
Although that guide doesn't mention how to run the example, or how to assemble the source files from working with Crossbar I assume I need the three files: server, html and config.json and that I make a directory structure from other crossbar examples for remote procedures.

I tried both twisted adbapi and txpostgres (I'd prefer txpostgres so database connections are in "asynchronous mode").
What I tried and the directory structure I created:
created directory ~/hello with sub-directories .crossbar and web

  • saved config (listed at end of article) as ~/hello/.crossbar/config.json
  • saved server ~/hello/hello.py
  • saved client ~/hello/web/index.html
    In the ~/hello folder, I try /opt/crossbar/bin/crossbar start --cbdir ~/hello/.crossbar, it terminates "ImportError: No module named txpostgres" and with adbapi example, "No module named psycopg2"
    Tried both as $home user and sudo su, but same error.

What I double-checked:
psycopg2-2.6 (latest) installed from source and all tests run successfully. Pip install txpostgres, tested fine txpostgres examples of module usage from http://txpostgres.readthedocs.org/en/latest/usage.html
It's like my crossbar binary can't see that I've installed psycopg2 and txpostgres

@oberstet
Copy link
Contributor

oberstet commented Jun 7, 2015

moved to crossbario/crossbar-examples#24

@oberstet oberstet closed this as completed Jun 7, 2015
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

2 participants