pythonurllibpraat

ImportError: cannot import name 'quote' from 'urllib' (/usr/lib/python3.7/urllib/__init__.py)


i am using praat from parselmouth in gooogle colab and i am getting this error when importing from parselmouth.praat import call

/usr/local/lib/python3.7/dist-packages/parselmouth/adapters/dfp/interface.py in <module>()
     15 from datetime import timedelta
     16 from pytz import timezone
---> 17 from urllib import quote
     18 
     19 # Parselmouth Imports

ImportError: cannot import name 'quote' from 'urllib' (/usr/lib/python3.7/urllib/__init__.py)

i tried installing diffirent version of urllib but nothing worked
i know that urllib uses import urllib.parse.quote instead offrom urllib import quote but i am not the one importing the urllib package it s the praat module and i cannot change it


Solution

  • I had the same problem and I fixed it by running pip uninstall parselmouth, then pip install praat-parselmouth

    Some info here

    Also see this Github issue