classification
Title: TypeError: 'type' object is not subscriptable
Type: behavior Stage:
Components: Versions: Python 3.9
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Dennis Sweeney, michal.dziczkowski
Priority: normal Keywords:

Created on 2021-07-18 20:25 by michal.dziczkowski, last changed 2021-07-19 07:20 by Dennis Sweeney.

Messages (2)
msg397758 - (view) Author: Michal D. (michal.dziczkowski) Date: 2021-07-18 20:25
While attempting to run an application with was working before I had updated Python to the version 3.9, I had recieved following error message:


`
Fatal Python error: init_import_size: Failed to import the site module
Python runtime state: initialized

Traceback (most recent call last):

  File "/usr/lib/python3.9/site.py", line 79, in <module>
    import os
  File "/usr/lib/python3.9/os.py", line 29, in <module>
    from _collections_abc import _check_methods
  File "/usr/lib/python3.9/_collections_abc.py", line 12, in <module>
    GenericAlias = type(list[int])

TypeError: 'type' object is not subscriptable


`

Any workarounds for this ?


OS: Debian 10 (64-bit)
msg397779 - (view) Author: Dennis Sweeney (Dennis Sweeney) * (Python triager) Date: 2021-07-19 07:20
> While attempting to run an application

How are you starting this application? It looks like you're using Python 3.9 standard library files (like _collections_abc.py in the traceback you posted), but is it possible that you're accidentally running an older version of the interpreter?
History
Date User Action Args
2021-07-19 07:20:39Dennis Sweeneysetnosy: + Dennis Sweeney
messages: + msg397779
2021-07-18 20:25:01michal.dziczkowskicreate