Closed Svantulden closed 9 years ago
Humm, I'm running it with python3.4, I guess you are on a 2.x version?
Oh yeah that makes sense. I read somewhere that python3.4 would be installed with ubuntu 14.04 (which I am using with Photon). This is the case, but when running py.test it uses 2.7.6 automatically, instead of the also-installed python3.4.
I found here that I can use the python3 command to force using 3.4, but this doesn't seem to work with py.test ? Have you got an idea how I can use the correct version for py.test?
When dealing with python, you really want to use virtualenvs.
Basically, in a brand new 14.04, you should do something like:
sudo apt-get install python-virtualenv python-pip virtualenvwrapper
mkvirtualenv photon --python=/usr/bin/python3.4
(Mayce, once virtualenvwrapper is installed, you need to start a new shell session.) Then, from the root of osm-geocoding-tester:
pip install -r requirements.txt
To deactivate the virtualenv:
deactivate
To activate again:
workon photon
Amazing, thanks for taking the time to write this. I can now successfully run tests on my Photon machine.
Would it be beneficial for other people if I make a PR for the readme.md
about this? Or should it be expected to have enough knowledge of virtualenvs before using this?
We can hardly have too much documentation, so if you feel the energy, feel free to clean this up and put in the README, yep :)
Hi,
I would like to use the osm-geocoding-tester to test my photon setup with some Germany data, but I am running into some issues.
First off, when running
py.test -x -m germany --api-url http://localhost:2322/api/
after installing dependencies viasudo pip install -r requirements.txt
, I got the following error:I fixed this error by adding
# -*- coding: utf-8 -*-
to the top ofbase.py
(I can submit a PR if you want).Now I run the test again and get the following error:
Any idea how to fix this? I am not very experienced with Python unfortunately, so maybe this is a small issue?