Giter Club home page Giter Club logo

Comments (18)

Fuyukai avatar Fuyukai commented on July 28, 2024

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.

from owapi.

tutchmedia avatar tutchmedia commented on July 28, 2024

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..."

from owapi.

Fuyukai avatar Fuyukai commented on July 28, 2024
  1. clone the repo
  2. sudo apt install python3-pip
  3. pip install -r requirements.txt

from owapi.

tutchmedia avatar tutchmedia commented on July 28, 2024

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

ImportError: No module named 'owapi'

Thanks for the help!

from owapi.

Fuyukai avatar Fuyukai commented on July 28, 2024

You have to run it like so:

PYTHONPATH=. asphalt run -l uvloop config.yml

from owapi.

tutchmedia avatar tutchmedia commented on July 28, 2024

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.

from owapi.

Fuyukai avatar Fuyukai commented on July 28, 2024

What's the output of asphalt --help?

from owapi.

din73107 avatar din73107 commented on July 28, 2024

can use api under php?

from owapi.

Fuyukai avatar Fuyukai commented on July 28, 2024

what

also, put that in a separate issue

from owapi.

din73107 avatar din73107 commented on July 28, 2024

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

from owapi.

tutchmedia avatar tutchmedia commented on July 28, 2024

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

http://pastebin.com/AXFyjV4J

from owapi.

tutchmedia avatar tutchmedia commented on July 28, 2024

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

from owapi.

Fuyukai avatar Fuyukai commented on July 28, 2024

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

from owapi.

tutchmedia avatar tutchmedia commented on July 28, 2024

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

from owapi.

Fuyukai avatar Fuyukai commented on July 28, 2024

You need to have a redis server installed and running.

from owapi.

tutchmedia avatar tutchmedia commented on July 28, 2024

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

from owapi.

Fuyukai avatar Fuyukai commented on July 28, 2024

Nope, I merely use their data set.

from owapi.

kevinboulain avatar kevinboulain commented on July 28, 2024

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?

from owapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.