SwoopSearch / pyaddress

pyaddress is an address parsing library, taking the guesswork out of using addresses in your applications. We use it as part of our apartment search and apartment spider applications.
BSD 3-Clause "New" or "Revised" License
100 stars 43 forks source link

SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Unmatched token: ", token)? #11

Open Lwhieldon opened 1 year ago

Lwhieldon commented 1 year ago

When I try to run a basic call to pyaddress, I get the below error:

Sample Code:

import usaddress
from address import AddressParser
address_line1 = '728 Nashville Ave'
addr = usaddress.parse(address_line1)
ad = AddressParser()
addr2 = ad.parse_address(address_line1)
#perform some cleanup and functions on addr...
addr2.street_suffix

Error:

Traceback (most recent call last):

  File C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py:3369 in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)

  Input In [25] in <cell line: 2>
    from address import AddressParser

  File ~\AppData\Roaming\Python\Python39\site-packages\address\__init__.py:1 in <module>
    from .address import Address, AddressParser

  File ~\AppData\Roaming\Python\Python39\site-packages\address\address.py:185
    print "Unmatched token: ", token
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Unmatched token: ", token)?
wimvc1 commented 6 months ago

Currently no support for Python 3 See: https://github.com/SwoopSearch/pyaddress/pull/10