Skip to content

Fixed errors from Assess-Warehouse-Address.py and Assess-Shipping-Containers.py#3

Open
nhyadav wants to merge 2 commits intoApress:masterfrom
nhyadav:code_contribute
Open

Fixed errors from Assess-Warehouse-Address.py and Assess-Shipping-Containers.py#3
nhyadav wants to merge 2 commits intoApress:masterfrom
nhyadav:code_contribute

Conversation

@nhyadav
Copy link

@nhyadav nhyadav commented Jan 30, 2022

VKHCG/03-Hillman/02-Assess

  • Assess-Warehouse-Address.py
    There is one following error.
    1 geopy.exc.ConfigurationError: Please specify a custom user_agent with Nominatim(user_agent='my-application') or by overriding the default user_agent: geopy.geocoders.options.default_user_agent = 'my-application'

    - geolocator = Nominatim()
    + geolocator = Nominatim(user_agent="My_geolocate")
  • Assess-Shipping-Containers.py
    There are two following errors.
    1 AttributeError: type object 'DataFrame' has no attribute 'from_items'.

    + from collections import OrderedDict
    .
    .
    - PalletFrame = pd.DataFrame.from_items(PalletLine) 
    + PalletFrame = pd.DataFrame.from_dict(OrderedDict(PalletLine)) 
    else:
    - PalletRow = pd.DataFrame.from_items(PalletLine)
    + PalletRow = pd.DataFrame.from_dict(OrderedDict(PalletLine))

    2 pandas.io.sql.DatabaseError: Execution failed on sql ' SELECT * FROM Assess_Box_on_Pallet;': no such table: main.Assess_Pallet.

    + print("#######################")
    + sTable = "Assess_Pallet"
    + print("Storing:",sDatabaseName,"Table:",sTable)
    + PalletFrame.to_sql(sTable, conn,if_exists="replace")
    + print("#######################")

Fixed "Please specify a custom user_agent with Nominatim(user_agent="my-application") or by overriding the default user_agent: geopy.geocoders.options.default_user_agent = "my-application" " error.
fixed: "AttributeError: type object 'DataFrame' has no attribute 'from_items' " and  "pandas.io.sql.DatabaseError: Execution failed on sql ' SELECT  * FROM Assess_Box_on_Pallet;': no such table: main.Assess_Pallet" errors.
@nhyadav nhyadav changed the title Code contribute Fixed errors from Assess-Warehouse-Address.py and Assess-Shipping-Containers.py Feb 4, 2022
@elladupon00
Copy link

salut

@elladupon00
Copy link

moi ses elladupon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants