Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:12:23+00:00 2026-06-04T18:12:23+00:00

import csv from geopy import geocoders import time g = geocoders.GeocoderDotUS() spamReader = csv.reader(open(‘locations.csv’,

  • 0
import csv
from geopy import geocoders
import time

g = geocoders.GeocoderDotUS()

spamReader = csv.reader(open('locations.csv', 'rb'), delimiter='\t', quotechar='|')

f = open("output.txt",'w')

for row in spamReader:
a = ', '.join(row)
#exactly_one = False
time.sleep(1)


place, (lat, lng) = g.geocode(a)


b = str(place) + "," + "[" + str(lat) + "," + str(lng) + "]" + "\n"
print b
f.write(b)

I can’t really determine why I am receiving

Traceback (most recent call last):
File “C:\Users\Penguin\workspace\geocode-nojansdatabase\src\yahoo.py”, line 17, in
place, (lat, lng) = g.geocode(a)
TypeError: ‘NoneType’ object is not iterable

I checked to make sure there was a value in a before the geocode(a) call was placed. Perhaps a match was not found? If that is the case the I guess I just have to add in an if not b then statement. Does anyone know more about this?

I am seeing that adding a

a = ', '.join(row)
print(a)

Does yield:
178 Connection Rd Pomona QLD

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:12:24+00:00Added an answer on June 4, 2026 at 6:12 pm
    >>> a, (b, c) = None
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: 'NoneType' object is not iterable
    >>> a, (b, c) = ('foo', None)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: 'NoneType' object is not iterable
    

    Your guess is correct. Check before unpacking.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

import csv from geopy import geocoders import time g = geocoders.GeocoderDotUS() spamReader = csv.reader(open('locations.csv',
import csv from geopy import geocoders g = geocoders.Google() spamReader = csv.reader(open('locations.csv', 'rb'), delimiter='\t',
I'm trying to import a csv (that is a data extract from a SQL
I'm trying to import a matrix (about 80.000 rows) from a csv file to
I took this script from here : import csv from itertools import izip f
I have a class for products import from CSV file operation which requires about
I'm refactoring existing class to support Products import from CSV file.   Requirements: 1)
I am trying to import a CSV from a url using the feeds module,
I'm writing an import from CSV and have been able to successfully manually set
We have written a number of SSIS packages that import data from CSV files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.