Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when importing deepgram (unhashable type: 'list') #17

Closed
netervati opened this issue Mar 20, 2022 · 7 comments
Closed

Error when importing deepgram (unhashable type: 'list') #17

netervati opened this issue Mar 20, 2022 · 7 comments

Comments

@netervati
Copy link

Current behavior

I'm trying to test the deepgram-sdk. However, I keep on encountering this issue:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\mycomputer\.virtualenvs\Python_Stuff-EaH8Zb-h\lib\site-packages\deepgram\__init__.py", line 2, in <module>
    from ._types import Options
  File "C:\Users\mycomputer\.virtualenvs\Python_Stuff-EaH8Zb-h\lib\site-packages\deepgram\_types.py", line 172, in <module>
    EventHandler = Union[Callable[[Any], None], Callable[[Any], Awaitable[None]]]
  File "c:\users\mycomputer\appdata\local\programs\python\python39\lib\typing.py", line 243, in inner
    return func(*args, **kwds)
  File "c:\users\mycomputer\appdata\local\programs\python\python39\lib\typing.py", line 316, in __getitem__
    return self._getitem(self, parameters)
  File "c:\users\mycomputer\appdata\local\programs\python\python39\lib\typing.py", line 421, in Union
    parameters = _remove_dups_flatten(parameters)
  File "c:\users\mycomputer\appdata\local\programs\python\python39\lib\typing.py", line 215, in _remove_dups_flatten
    all_params = set(params)
TypeError: unhashable type: 'list'

Steps to reproduce

  • Open terminal and run pipenv shell in an empty directory (or any directory of your choice)
  • Run pipenv install deepgram-sdk
  • Run python then type from deepgram import Deepgram or import deepgram. Press Enter afterwards.
  • The error should show by now

My environment

  • Operating System/Version: Windows 10
  • Language: Python 3.9.0
  • Virtual Environment used: Pipenv
@geekchick
Copy link
Contributor

Hi @netervati, sorry to hear you're having some issues with the import. Are you still experiencing this error? I haven't used pipenv yet with Deepgram, only virtualenv with pip. I'm using a Mac but can try and replicate your error in my Windows Azure machine.

Also, which version of Deepgram are you running?

@netervati
Copy link
Author

@geekchick The version that I'm using is deepgram-sdk-0.2.5. Also, I tried installing and testing Deepgram outside of pipenv and I'm still getting the same error. For now, I'm using the cURL version.

@franz-xaver-hallhuber
Copy link

I am also having this issue. Does deepgram need a specific OS or Python version?

@geekchick
Copy link
Contributor

Hi @franz-xaver-hallhuber, sorry to hear you're having trouble. Which version of Python are you using?

@sankalpbhatia20
Copy link

I am also experiencing the same error.
I tried using both Python2 and Python3 to install it.
Although deepgram-sdk is showing up on my list of libraries installed but I am not able to import it.

(I am using deepgram-sdk 0.3.0)

@geekchick
Copy link
Contributor

Hi @sankalpbhatia20 can you tell me the exact version of Python 3 you're using? Deepgram works with Python 3.7 and up.

@geekchick
Copy link
Contributor

This issue was fixed in a previous version of Deepgram. To install the latest version of Deepgram do pip install deepgram-sdk . I'm closing this ticket for now. Please reach out if you have any additional questions. Thank you!

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

No branches or pull requests

4 participants