datamade / usaddress

:us: a python library for parsing unstructured United States address strings into address components
https://parserator.datamade.us/usaddress
MIT License
1.52k stars 304 forks source link

Error when attempting to label new data after install on python 3.12 #361

Open sunnyisle1 opened 9 months ago

sunnyisle1 commented 9 months ago

Logging issue in this repo instead of parserator since labeling and training are documented here.

Installed a development version of usaddress on python 3.12. An error is thrown when running the "parserator label ..." command, (No problems labeling & training with prior versions of python)

File "...\Lib\site-packages\parserator\training.py", line 11, in from imp import reload ModuleNotFoundError: No module named 'imp'

According to python docs, version 3.12 has replaced the 'imp' module with 'importlib'. But looking at the training.py file here: https://github.com/datamade/parserator/blob/master/parserator/training.py it's clear the 'reload' function isn't used anywhere in that code. I commented out the line in my local copy of training.py and was able to label and train successfully.

Been using this library for a couple years now and love it.