Comments (18)
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.
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.
- clone the repo
- sudo apt install python3-pip
- pip install -r requirements.txt
from owapi.
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.
You have to run it like so:
PYTHONPATH=. asphalt run -l uvloop config.yml
from owapi.
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.
What's the output of asphalt --help
?
from owapi.
can use api under php?
from owapi.
what
also, put that in a separate issue
from owapi.
I mean how to use the owapi in php
sorry for my English
from owapi.
Sorry for the delay in replying - i managed to sort the issue above. Running the command you gave shows this:
from owapi.
Never mind - sorted it now and it seems to be running. Although nothing coming through on port 4444. Will keep debugging now :)
from owapi.
To fix that error it's pip install --upgrade setuptools
from owapi.
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.
You need to have a redis server installed and running.
from owapi.
Installed and done. :) Many thanks for your help - You're not working with Master Overwatch are you? :D
from owapi.
Nope, I merely use their data set.
from owapi.
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)
- f HOT 1
- quickPlayStats and competitiveStats return empty arrays HOT 2
- Internal server exception being thrown HOT 3
- Dependencies require aioredis >=0.3.0,<1.0.0, however sub-dependency requires aioredis >=1.0 HOT 9
- Error 500
- stat_groups.find(".//span[@class='stat-title']").text is None HOT 4
- Some profiles returning "unsupported operand type(s) for +: 'int' and 'NoneType'" HOT 3
- "ValueError(\"could not convert string to float: 'null'\",)" HOT 3
- win rate, win , lose, games is NULL
- API down: error 500 HOT 5
- Hero-specific stats merged into general_stats HOT 6
- Error 502 HOT 2
- List index out of range HOT 4
- "ValueError(\"invalid literal for int() with base 10: '1,262'\",)" HOT 2
- New competitive system broke the API HOT 1
- "KeyError('src')" on a particular profile
- Redis on public API is dead HOT 2
- Feature: Docker-Image
- Kyoukai/asyncio issue : Task exception was never retrieved HOT 2
- Discontinuation. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owapi.