This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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

Created on 2021-07-18 20:25 by michal.dziczkowski, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (3)
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 committer) 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?
msg409551 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-01-03 00:46
I'm closing this because there is not enough information here to understand the issue and there was no reply to follow-up questions. 

Please reopen or create a new issue if you are still having a problem with this.
History
Date User Action Args
2022-04-11 14:59:47adminsetgithub: 88835
2022-01-03 00:46:47iritkatrielsetstatus: open -> closed

nosy: + iritkatriel
messages: + msg409551

resolution: works for me
stage: resolved
2021-07-19 07:20:39Dennis Sweeneysetnosy: + Dennis Sweeney
messages: + msg397779
2021-07-18 20:25:01michal.dziczkowskicreate