#hypothes.is

/

      • hslack has quit
      • hslack joined the channel
      • hslack has quit
      • hslack joined the channel
      • badon has left the channel
      • tilgovi joined the channel
      • hslack has quit
      • hslack joined the channel
      • badon joined the channel
      • tilgovi has quit
      • tilgovi joined the channel
      • mlncn has quit
      • hslack has quit
      • hslack joined the channel
      • mlncn joined the channel
      • mlncn has quit
      • hslack has quit
      • hslack joined the channel
      • tilgovi has quit
      • hslack has quit
      • hslack joined the channel
      • hslack has quit
      • hslack joined the channel
      • hslack
        <swapnil> Hello , Can anyone help?
      • <swapnil> I really need to get annotations working
      • <robertknight> igal: The easiest way to do this is using Chrome dev tools to inspect the network requests that the client makes when fetching, creating or updating annotations.
      • <robertknight> Additionally, if you get the ID of a particular annotation by clicking on its timestamp to open the perma-link page at `https://hypothes.is/a/ID`, you can then fetch the JSON version of that annotation using `curl https://hypothes.is/api/annotations/ID` on the command-line.
      • <robertknight> One caveat with the Chrome browser extension - you need to right-click _in the sidebar which displays the annotations_ and select “Inspect Frame” to bring up the dev tools for the HTML page where the network requests are actually made.
      • <robertknight> @swapnil - If you can describe the specific issue(s) that you are having getting the service running locally we may be able to help. Please understand though that while we make the source code of the service available for anyone to run, we also have our own development plan that we are working to. So except for those entities with whom we have a commercial contract, we cannot provide any guarantees about s
      • <swapnil> Yes
      • <swapnil> I have updated issues Robert and all I need is to get library working for app.
      • <swapnil> @robertknight Please check on Mac while trying to run h i got this issue. https://gist.github.com/swapnildeshmukh15/52b6c... Also if I tried same for Ubuntu as specified in document
      • <robertknight> The relevant error message from that Gist looks like:
      • <robertknight> ``` ld: library not found for -lssl clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'clang' failed with exit status 1 ```
      • hslack has quit
      • hslack joined the channel
      • <robertknight> Are you using Homebrew to install dependencies?
      • <robertknight> If so, can you run `brew list` and post the output here?
      • <swapnil> Ok
      • <swapnil> 2 min
      • <swapnil> Cypertss-MacBook-Air:h cyperts$ brew list gdbmlibeventnodepkg-configpythonsqlite icu4clibffiopensslpostgresqlreadlinewget Cypertss-MacBook-Air:h cyperts$
      • <robertknight> On my system, it looks like psychopg is linked to the version of libssl that ships with the system, not one installed by Homebrew: ``` ~/p/p/approx-string-search > otool -L ~/.virtualenvs/h/lib/python2.7/site-packages/psycopg2/_psycopg.so /Users/robert/.virtualenvs/h/lib/python2.7/site-packages/psycopg2/_psycopg.so: /usr/local/opt/postgresql/lib/libpq.5.dylib (compatibility version 5.0.0, current versio
      • (compatibility version 0.9.8, current version 0.9.8) /usr/lib/libcrypto.0.9.8.dylib (compatibility version 0.9.8, current version 0.9.8) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.0.0) ``` So that means the problem wasn’t that the “openssl” package wasn’t installed as I initially thought.
      • <robertknight> In particular, this answer: https://stackoverflow.com/a/39244687/434243
      • <swapnil> yes i have used homebrew
      • <swapnil> Hi
      • <swapnil> Tried with that stackoverflow solution
      • <swapnil> Now its showing this issue https://gist.github.com/anonymous/6b9be8cc51999...
      • <swapnil> I have that zope installed
      • <swapnil> but don't understand why its not fetching required function from there
      • <robertknight> Are you using a virtualenv?
      • <swapnil> yes
      • <swapnil> thats how it mentioned in doc. we need to create and activate python virtualenv
      • <robertknight> What output do you get from running `pip install -r requirements.txt` in the root of the “h” repository?
      • <swapnil> For all things its requirement already satisfied
      • <robertknight> Hmm. I’m not familiar with exactly how the “pip install” flow proceeds, but I wonder if somehow the “zope.interface” package is in a partially installed state (eg. maybe the metadata is there but the library contents are not). https://stackoverflow.com/a/40583856/434243 describes something similar.
      • <robertknight> OK. Going off-Slack for a bit to study something.
      • <swapnil> I have already tried that
      • <swapnil> Same response , requirement already satisfied.
      • <robertknight> Does the `zope/interface` dir exist in your site-packages folder? (see `pip install` output for the location of that)?
      • <swapnil> Yes
      • <swapnil> Its available and tried uninstall and reinstall as well in h directory
      • <swapnil> Cypertss-MacBook-Air:h cyperts$ pip install zope.interface Requirement already satisfied: zope.interface in /usr/local/lib/python2.7/site-packages Requirement already satisfied: setuptools in /usr/local/lib/python2.7/site-packages (from zope.interface)
      • <robertknight> Hmm, your `pip install` output is showing the status of packages installed to `/usr/local/lib` rather than the virtualenv for h.
      • <swapnil> Do I have to install package in virtualenv?
      • <swapnil> It says install h and create virtualenv in it
      • <robertknight> When a virtualenv is active, `pip install` should install the packages into the corresponding virtualenv folder.
      • <swapnil> Its there
      • <robertknight> What does “Its there” mean?
      • <swapnil> Cypertss-MacBook-Air:h cyperts$ source .venv/bin/activate (.venv) Cypertss-MacBook-Air:h cyperts$ pip install zope.interface Requirement already satisfied: zope.interface in ./.venv/lib/python2.7/site-packages/zope.interface-4.4.1-py2.7-macosx-10.12-x86_64.egg Requirement already satisfied: setuptools in ./.venv/lib/python2.7/site-packages (from zope.interface) Requirement already satisfied: six>=1.6.0 in ./.ve
      • setuptools->zope.interface) Requirement already satisfied: packaging>=16.8 in ./.venv/lib/python2.7/site-packages (from setuptools->zope.interface) Requirement already satisfied: appdirs>=1.4.0 in ./.venv/lib/python2.7/site-packages (from setuptools->zope.interface) Requirement already satisfied: pyparsing in ./.venv/lib/python2.7/site-packages (from packaging>=16.8->setuptools->zope.interface) (.venv) Cypertss-MacBook-A
      • <swapnil> But when I run "Make Dev" command it still throws me same error
      • <swapnil> from zope.interface import ( ImportError: No module named interface make: *** [dev] Error
      • <robertknight> Same error if you try to import that module in a REPL?
      • <swapnil> Havent tried in h
      • <swapnil> OK
      • <swapnil> Seems uninstall and install got something new here
      • <swapnil> import zope.sqlalchemy ImportError: No module named sqlalchemy make: *** [dev] Error 1
      • <robertknight> What is the output of `pip list` (when run in the same virtualenv)?
      • <swapnil> posting here
      • <robertknight> OK, it looks like all the packages listed in `requirements.txt` after the psycopg2 which originally failed to install (producing the “ssl” error from earlier) have not been installed in that virtualenv.
      • <swapnil> Do I have to reinstall it?
      • <swapnil> Whats quick way to do that?
      • <robertknight> Running `pip install -r requirements.txt` should do, but it _must be run with the virtualenv active_. The other option is to remove the virtualenv and ‘.pydeps’, recreate the virtualenv (and activate it), then re-run `make dev`.
      • <swapnil> OK
      • <swapnil> Will do right away
      • <swapnil> Seems working got this issue now
      • <swapnil> found = __import__(used) ImportError: No module named pyramid_debugtoolbar make: *** [dev] Error 1
      • <swapnil> Installed pyramid_debugtoolbar
      • <robertknight> Oh, sorry. Remove `.pydeps`, then run `make .pydeps`. The difference is that `pip install -r requirements.txt only installs the packages needed to _run_ Hypothesis, which doesn’t include some development-only packages.
      • <swapnil> return self.dbapi.connect(*cargs, **cparams) File "/Users/cyperts/h/.venv/lib/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) fe_sendauth: no password supplied make: *** [dev] Error 1
      • <swapnil> OK
      • <swapnil> Will do that rightnow
      • <swapnil> Whats command to remove `.pydeps`,
      • <robertknight> `rm .pydeps`
      • <robertknight> It’s just an empty file used to keep track of whether dependencies have been installed or not.
      • <swapnil> OK
      • <swapnil> make .pydeps is now installing all dependencies again
      • <swapnil> do I have to recreate virtualenv?
      • hslack has quit
      • hslack joined the channel
      • <swapnil> Same error as mentioned above
      • <robertknight> `fe_sendauth: no password supplied`?
      • <swapnil> File "/Users/cyperts/h/.venv/lib/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect conn = _connect(dsn, connection_factory=connection_factory, async=async) sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) fe_sendauth: no password supplied make: *** [dev] Error 1
      • <swapnil> Yes
      • <robertknight> I don’t immediately have an answer for that, except that it relates to the Postgres DB. By default, the dev server connects to the Postgres DB running in the Docker container using the username `postgres` with no password supplied. I’m afraid I have to leave for a while now. In the meantime I would check that you can connect to the DB in the Postgres Docker container using that username.
      • <swapnil> OK
      • <swapnil> Will check in that file
      • <swapnil> If someything sorts out will let you know. Or I'll be waiting for your reply
      • <swapnil> In that file on line 102 connection is define as : def connect(dsn=None, database=None, user=None, password=None, host=None, port=None, connection_factory=None, cursor_factory=None, async=False, **kwargs):
      • <swapnil> And Its called on 164 as conn = _connect(dsn, connection_factory=connection_factory, async=async)
      • <swapnil> @nick Since I am looking to develop app that will allow user to create notes on book they are reading . For hosting I am very much concern as with setting h and client on local is not smooth drive. So I would like to know what server configuration you will recommend. I am also interested to know what type of server you are using for hypothes.is And also is it possible to use existing postgresql database t
      • <nick> @swapnil yes, you can use an existing postgresql installation, although you'll probably want to create a database specifically for Hypothesis
      • <nick> what are the problems you're having trying to get set up?
      • <nick> we can help if you share specific problems with us!
      • <swapnil> Yes I have shared problem here
      • <swapnil>
      • <nick> ok, so what `DATABASE_URL` are you using?
      • <swapnil> I haven't made any change in h library or replaced any db URL. It's default one . I was just following document instructions.
      • <nick> and how did you set up postgres?
      • <swapnil> Through docker
      • <nick> what does `docker ps` say?
      • <swapnil>
      • <swapnil> Let me check for docker ps
      • <swapnil> Its blank
      • <swapnil> CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
      • <swapnil> On h directory
      • <nick> so whatever postgres server your `h` is trying to connect to, it's not one running in docker :slightly_smiling_face:
      • <nick> if I recall correctly you had a port clash, didn't you?
      • <swapnil> Yes
      • <nick> because you already had postgres running on port 5432.
      • <nick> did you resolve that?
      • <swapnil> Yes
      • <swapnil> That got resolved
      • <nick> how did you fix that?
      • <swapnil> Postgre server got installed twice so we removed one instance
      • <swapnil> And that got sorted
      • <nick> ok, so which postgres server is `h` talking to?
      • <swapnil> Postgres_1
      • <swapnil> This is installed laterward
      • <nick> that sounds like you're expecting it to be running in docker?
      • hslack has quit
      • hslack joined the channel
      • <swapnil> Yes
      • <nick> but your `docker ps` output says there's nothing running?
      • <nick> and the error suggests that `h` is talking to a running postgres server.