controversial / wikipedia-map

A web app for visualizing the connections between Wikipedia pages.
https://wikipedia.luk.ke
MIT License
446 stars 77 forks source link

executing `api/api.py` #24

Closed Yissam closed 8 years ago

Yissam commented 8 years ago

Hi, i have the error below when i try to execute >python api.py to run the flask server.

Traceback (most recent call last): File "api.py", line 10, in from wikipedia_parse import * File "C:\WikiMap\wikipedia-map-master\api\wikipedia_parse.py", line 164 print is_article(":Cows"), is_article("WP:UA") # Test if it's an article ^ SyntaxError: invalid syntax

Thank you in advance for your help

controversial commented 8 years ago

Sorry, Wikipedia Map is currently written for Python 2 and unfortunately does not support Python 3. I'm going to configure a new server for Python 3 Flask, and the script will probably be updated in the next few months.

In the meantime, please execute with Python 2 and let me know if you have further issues

Thanks, Luke On Thu, Aug 25, 2016 at 9:17 AM Yissam notifications@github.com wrote:

Hi, i have the error below when i try to execute >python api.py to run the flask server.

Traceback (most recent call last): File "api.py", line 10, in from wikipedia_parse import * File "C:\WikiMap\wikipedia-map-master\api\wikipedia_parse.py", line 164 print is_article(":Cows"), is_article("WP:UA") # Test if it's an article ^ SyntaxError: invalid syntax

Thank you in advance for your help

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/controversial/wikipedia-map/issues/24, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ5Yr9dC5sUr7I51C3TVTtUzKhaDs7V9ks5qjZXIgaJpZM4JtDkO .

Yissam commented 8 years ago

Thank you for your reactivity.

i have just executed it with Python 2.7.11 and i have the error below.

Traceback (most recent call last): File "api.py", line 10, in from wikipedia_parse import * File "C:\WikiMap\wikipedia-map-master\api\wikipedia_parse.py", line 10, in import bs4 ImportError: No module named bs4

controversial commented 8 years ago

You'll need to install the BeautifulSoup module.

On Thu, Aug 25, 2016 at 10:58 AM Yissam notifications@github.com wrote:

Thank you for your reactivity.

i have just executed it with Python 2.7.11 and i have the error below.

Traceback (most recent call last): File "api.py", line 10, in from wikipedia_parse import *

File "C:\WikiMap\wikipedia-map-master\api\wikipedia_parse.py", line 10, in import bs4 ImportError: No module named bs4

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/controversial/wikipedia-map/issues/24#issuecomment-242419266, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ5Yr60e0Z1dj6JhRarqcWv4xZG4GXJxks5qja2ygaJpZM4JtDkO .

Yissam commented 8 years ago

Flask server was started on http://127.0.0.1:12345. when i try to reach this address by the browser i have error 404 not Found

  • Restarting with stat
  • Debugger is active!
  • Debugger pin code: 180-514-756
  • Running on http://127.0.0.1:12345/ (Press CTRL+C to quit) 127.0.0.1 - - [25/Aug/2016 17:07:26] "GET / HTTP/1.1" 404 -
controversial commented 8 years ago

Yes, the API provides endpoints at sub-URLs but nothing at /. Try localhost:12345/links?page=cats to see the connections Wikipedia Map would make for that page.

Yissam commented 8 years ago

ConnectionError: HTTPSConnectionPool(host='en.wikipedia.org', port=443): Max retries exceeded with url: /w/api.php?redirects=1&format=json§ion=0&prop=text&action=parse&page=cats (Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x00000000047D4A90>: Failed to establish a new connection: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))

Yissam commented 8 years ago

I have this connection error towards en.wikipedia.org!!

Yissam commented 8 years ago

image

controversial commented 8 years ago

Can you successfully visit this page in your browser? On Thu, Aug 25, 2016 at 11:31 AM Yissam notifications@github.com wrote:

ConnectionError: HTTPSConnectionPool(host='en.wikipedia.org', port=443): Max retries exceeded with url: /w/api.php?redirects=1&format=json§ion=0&prop=text&action=parse&page=cats (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond',))

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/controversial/wikipedia-map/issues/24#issuecomment-242430835, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ5Yr-ZKsNaMpSdItJuXGHpmIh0IUROyks5qjbVogaJpZM4JtDkO .

Yissam commented 8 years ago

yes ...

image

Yissam commented 8 years ago

It's corrected. it was a proxy problem

controversial commented 8 years ago

I'm glad. If you have any more questions, you're welcome to open new issues. Thanks 😀

Yissam commented 8 years ago

thank you very much

controversial commented 8 years ago

No problem 😉

On Thu, Aug 25, 2016 at 12:09 PM Yissam notifications@github.com wrote:

thank you very much

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/controversial/wikipedia-map/issues/24#issuecomment-242444636, or mute the thread https://github.com/notifications/unsubscribe-auth/AJ5Yr54CugYsylEzJoC9ttTXP84i101sks5qjb3mgaJpZM4JtDkO .