Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Installation issues #1

Closed
tutchmedia opened this issue Jun 2, 2016 · 18 comments
Closed

Installation issues #1

tutchmedia opened this issue Jun 2, 2016 · 18 comments

Comments

@tutchmedia
Copy link

Hi,

Looking forward to trying this out - having a few issues running it though.

I've spun up a server with Ubuntu 14.04 and clones the repo but it doesn't seem to want to run. Installing from requirements.txt seems to miss Asphalt too.

What setup are you using and what version of Python should be used?

@Fuyukai
Copy link
Owner

Fuyukai commented Jun 2, 2016

I run this on a 16.04 LTS box, running under Python 3.5.

It'd be great if you can provide a full traceback for the install, as installing this can be a bit complicated due to the requirements.

@tutchmedia
Copy link
Author

Rebuilding now with 16.04 - Python 3.5.1 installed as default.

  • Cloned GitHub Repo
  • apt install python-pip
  • pip freeze > requirements.txt
  • pip install requirements.txt
    -- This throws an error "Couldn't find a version that satisfies the requirement requirements.txt - No matching distribution found..."

@Fuyukai
Copy link
Owner

Fuyukai commented Jun 2, 2016

  1. clone the repo
  2. sudo apt install python3-pip
  3. pip install -r requirements.txt

@tutchmedia
Copy link
Author

Brilliant - seems to have worked. However, when i run "Python3 app.py" i receive:

ImportError: No module named 'owapi'

Thanks for the help!

@Fuyukai
Copy link
Owner

Fuyukai commented Jun 2, 2016

You have to run it like so:

PYTHONPATH=. asphalt run -l uvloop config.yml

@tutchmedia
Copy link
Author

Running that responds with:
"error: Invalid value for "configfile": Could not open file: run: No such file or directory"

I'm inside the owapi directory where the config.yml file is.

@Fuyukai
Copy link
Owner

Fuyukai commented Jun 2, 2016

What's the output of asphalt --help?

@din73107
Copy link

din73107 commented Jun 2, 2016

can use api under php?

@Fuyukai
Copy link
Owner

Fuyukai commented Jun 2, 2016

what

also, put that in a separate issue

@din73107
Copy link

din73107 commented Jun 2, 2016

I mean how to use the owapi in php
sorry for my English

@tutchmedia
Copy link
Author

Sorry for the delay in replying - i managed to sort the issue above. Running the command you gave shows this:

http://pastebin.com/AXFyjV4J

@tutchmedia
Copy link
Author

Never mind - sorted it now and it seems to be running. Although nothing coming through on port 4444. Will keep debugging now :)

@Fuyukai
Copy link
Owner

Fuyukai commented Jun 2, 2016

To fix that error it's pip install --upgrade setuptools

@tutchmedia
Copy link
Author

That's what i did which fixed it :) I've got the api returning 404 but when entering an actual valid endpoint, i get this:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/kyokai/app.py", line 281, in delegate_request
response = await coro.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/kyokai/route.py", line 90, in invoke
result = await self._wrapped_coro(ctx, *matches)
File "/root/owapi/owapi/util.py", line 49, in res
result = await func(ctx, *args)
File "/root/owapi/owapi/routes.py", line 40, in get_stats
data = await mo.region_helper(ctx, battletag, region=ctx.request.values.get("region", None))
File "/root/owapi/owapi/interface.py", line 112, in region_helper
lookup = await lookup_user(ctx, battletag)
File "/root/owapi/owapi/interface.py", line 94, in lookup_user
data = await get_page_body(ctx, MO_LOOKUP_URL.format(btag=battletag))
File "/root/owapi/owapi/interface.py", line 45, in get_page_body
result = await util.with_cache(ctx, _real_get_body, url, expires=cache_time)
File "/root/owapi/owapi/util.py", line 24, in with_cache
got = await ctx.redis.get(built)
File "/usr/local/lib/python3.5/dist-packages/aioredis/commands/init.py", line 36, in execute
conn = yield from self.get_atomic_connection()
File "/usr/local/lib/python3.5/dist-packages/aioredis/commands/init.py", line 45, in get_atomic_connection
_self._conn_args, *_self._conn_kwargs)
File "/usr/local/lib/python3.5/dist-packages/aioredis/connection.py", line 69, in create_connection
host, port, ssl=ssl, loop=loop)
File "/usr/lib/python3.5/asyncio/streams.py", line 78, in open_connection
lambda: protocol, host, port, **kwds)
File "uvloop/loop.pyx", line 1441, in create_connection (uvloop/loop.c:24005)
File "uvloop/loop.pyx", line 1420, in uvloop.loop.Loop.create_connection (uvloop/loop.c:23667)
File "uvloop/future.pyx", line 218, in await (uvloop/loop.c:91321)
File "uvloop/task.pyx", line 186, in uvloop.loop.BaseTask._fast_wakeup (uvloop/loop.c:96518)
File "uvloop/future.pyx", line 78, in uvloop.loop.BaseFuture._result_impl (uvloop/loop.c:89556)
ConnectionRefusedError: [Errno 111] Connection refused

@Fuyukai
Copy link
Owner

Fuyukai commented Jun 2, 2016

You need to have a redis server installed and running.

@tutchmedia
Copy link
Author

Installed and done. :) Many thanks for your help - You're not working with Master Overwatch are you? :D

@Fuyukai
Copy link
Owner

Fuyukai commented Jun 2, 2016

Nope, I merely use their data set.

@Fuyukai Fuyukai closed this as completed Jun 2, 2016
@kevinboulain
Copy link

For newcomers, I think it could be nice to put the PYTHONPATH=. asphalt run -l uvloop config.yml in the readme.

By the way, you may be interested to know that there was an issue with typeguard in Python 3.5.2 until now: agronholm/typeguard#2
It may be interesting to upgrade the requirements.txt?

@Downy Downy mentioned this issue Jul 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants