Python Forum
Installing and running a python web scraping app from github to a windows 8.1 system
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing and running a python web scraping app from github to a windows 8.1 system
#14
Hi to all Smile ,

finally I managed to install all libraries for this github project and when I type
airbnb
I get all command options
usage: airbnb.py [options]

Manage a database of Airbnb listings.

optional arguments:
-h, --help show this help message and exit
-v, --verbose write verbose (debug) output to the log file
-c config_file, --config_file config_file
explicitly set configuration file, instead of using
the default <username>.config
-asa search_area, --addsearcharea search_area
add a search area to the database. A search area is
typically a city, but may be a bigger region.
-asv search_area, --add_survey search_area
add a survey entry to the database, for search_area
-dbp, --dbping Test the database connection
-dh host_id, --displayhost host_id
display web page for host_id in browser
-dr room_id, --displayroom room_id
display web page for room_id in browser
-dsv survey_id, --delete_survey survey_id
delete a survey from the database, with its listings
-f [survey_id], --fill [survey_id]
fill details for rooms collected with -s
-lsa search_area, --listsearcharea search_area
list information about this search area from the
database
-lr room_id, --listroom room_id
list information about room_id from the database
-ls, --listsurveys list the surveys in the database
-psa search_area, --printsearcharea search_area
print the name and neighborhoods for search area
(city) from the Airbnb web site
-pr room_id, --printroom room_id
print room_id information from the Airbnb web site
-ps survey_id, --printsearch survey_id
print first page of search information for survey from
the Airbnb web site
-psn survey_id, --printsearch_by_neighborhood survey_id
print first page of search information for survey from
the Airbnb web site, by neighborhood
-psz survey_id, --printsearch_by_zipcode survey_id
print first page of search information for survey from
the Airbnb web site, by zipcode
-psb survey_id, --printsearch_by_bounding_box survey_id
print first page of search information for survey from
the Airbnb web site, by bounding_box
-s survey_id, --search survey_id
search for rooms using survey survey_id
-sn survey_id, --search_by_neighborhood survey_id
search for rooms using survey survey_id
-sb survey_id, --search_by_bounding_box survey_id
search for rooms using survey survey_id, by bounding
box
-asb search_area, --add_and_search_by_bounding_box search_area
add a survey for search_area and search , by bounding
box
-sz survey_id, --search_by_zipcode survey_id
search for rooms using survey_id, by zipcode
-V, --version show program's version number and exit
-?


...but I still have to configure postgresql database. All I have done is installing postgre sql ver 10 on my system.
Tom Slee in his help file says:
Quote:Installing and upgrading the database schema
The airbnb.py script works with a PostgreSQL database. You need to have the PostGIS extension installed. The schema is in

the file postgresql/schema_current.sql. You need to run that file to create the database tables to start with (assuming

both your user and database are named airbnb).

For example, if you use psql:

psql --user airbnb airbnb < postgresql/schema_current.sql
Preparing to run a survey
To check that you can connect to the database, run

python airbnb.py -dbp
I'm not able to find the schema_current.sql file and of course when I check the database connection with:

python airbnb.py -dbp

I get this:
Error:
ERROR Connection test failed Traceback (most recent call last): File "C:\python_37\airbnb\airbnb_config.py", line 186, in connect self.connection = psycopg2.connect(**cattr) File "C:\python_37\lib\site-packages\psycopg2\__init__.py", line 130, in conne ct conn = _connect(dsn, connection_factory=connection_factory, **kwasync) psycopg2.OperationalError: fe_sendauth: no password supplied During handling of the above exception, another exception occurred: Traceback (most recent call last): File "airbnb.py", line 142, in db_ping conn = config.connect() File "C:\python_37\airbnb\airbnb_config.py", line 190, in connect logger.error(pgoe.message) AttributeError: 'OperationalError' object has no attribute 'message'
Could someone help me in configuring psql database? Huh

p.s. here is my airbnb config file if someone wants to check it:
https://drive.google.com/open?id=1_psMrQ...r8_kAvobyh

Quote:Could someone help me in configuring psql database?

In particular, in the gitub folder there is a postgresql folder.
Do I have to copy these files in my postgresql installation? and if so, where?

And where do I have to run this code?:
psql --user airbnb airbnb < postgresql/schema_current.sql
Reply


Messages In This Thread
RE: Installing and running a python web scraping app from github to a windows 8.1 system - by eugenioca - Sep-27-2018, 08:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Installing Github-programs AudunNilsen 1 324 Mar-22-2024, 04:28 PM
Last Post: deanhystad
  Advice for installing python app from github ? Adi44 6 1,425 Aug-07-2023, 06:34 PM
Last Post: snippsat
  Python script running under windows over nssm.exe JaroslavZ 0 809 May-12-2023, 09:22 AM
Last Post: JaroslavZ
  Installing Qt for Python. (On Windows 10) davediamond 22 5,078 Apr-18-2022, 06:50 AM
Last Post: ndc85430
  batch file for running python scipt in Windows shell MaartenRo 2 2,060 Jan-21-2022, 02:36 PM
Last Post: MaartenRo
  Installing auto-sklearn on Windows 10 Led_Zeppelin 1 2,765 Apr-15-2021, 08:02 PM
Last Post: bowlofred
  Need help installing infoblox-client on Windows 10 dazmac10 1 2,613 Mar-07-2021, 10:57 PM
Last Post: snippsat
  How to link Sublime Text 3 Build system to Python 3.9 Using Windows 10 Fanman001 2 4,783 Mar-04-2021, 03:09 PM
Last Post: martpogs
  Running python scripts from github etc pacmyc 7 3,870 Mar-03-2021, 10:26 PM
Last Post: pacmyc
  Difference between os.system("clear") and os.system("cls") chmsrohit 7 16,918 Jan-11-2021, 06:30 PM
Last Post: ykumar34

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020