[GH-ISSUE #235] subprocess.TimeoutExpired #212

Closed
opened 2026-02-26 12:20:50 +03:00 by kerem · 4 comments
Owner

Originally created by @USPRPC on GitHub (Jan 23, 2022).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/235

Command '('c:\users\myuser\appdata\local\programs\python\python39\python.exe', '-c', '\nimport sys\nimport pkgutil\nimport traceback\n\n# pkgutil.walk_packages does not walk subpackages of zipped files per https://bugs.python.org/issue14209.\n# This is a workaround.\ndef walk_packages(path=None, prefix='', onerror=None):\n def seen(p, m={}):\n if p in m:\n return True\n m[p] = True\n\n for importer, name, ispkg in pkgutil.iter_modules(path, prefix):\n if not name.startswith(prefix):\n name = prefix + name\n yield importer, name, ispkg\n\n if ispkg:\n try:\n import(name)\n except ImportError:\n if onerror is not None:\n onerror(name)\n except Exception:\n if onerror is not None:\n onerror(name)\n else:\n traceback.print_exc(file=sys.stderr)\n print("collect_submodules: failed to import %r!" % name, file=sys.stderr)\n else:\n path = getattr(sys.modules[name], 'path', None) or []\n\n # don't traverse path items we've seen before\n path = [p for p in path if not seen(p)]\n\n # Use Py2 code here. It still works in Py3.\n for item in walk_packages(path, name+'.', onerror):\n yield item\n # This is the original Py3 code.\n #yield from walk_packages(path, name+'.', onerror)\n\nfor module_loader, name, ispkg in walk_packages(['c:\\users\\myuser\\appdata\\local\\programs\\python\\python39\\lib\\site-packages\\gevent'], 'gevent.'):\n print('\n$_pyi:' + name + '*')\n')' timed out after 60 seconds

my imports:

import requests
import os
import discord
from discord.ext import commands
import sys
import time
import os
import json
import base64
import sqlite3
import win32crypt
from Crypto.Cipher import AES
import shutil
from datetime import datetime, timedelta
import re
import time
from urllib.request import Request, urlopen
import requests
import socket
import cv2
from PIL import ImageGrab
Originally created by @USPRPC on GitHub (Jan 23, 2022). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/235 Command '('c:\\users\\myuser\\appdata\\local\\programs\\python\\python39\\python.exe', '-c', '\nimport sys\nimport pkgutil\nimport traceback\n\n# ``pkgutil.walk_packages`` does not walk subpackages of zipped files per https://bugs.python.org/issue14209.\n# This is a workaround.\ndef walk_packages(path=None, prefix=\'\', onerror=None):\n def seen(p, m={}):\n if p in m:\n return True\n m[p] = True\n\n for importer, name, ispkg in pkgutil.iter_modules(path, prefix):\n if not name.startswith(prefix):\n name = prefix + name\n yield importer, name, ispkg\n\n if ispkg:\n try:\n __import__(name)\n except ImportError:\n if onerror is not None:\n onerror(name)\n except Exception:\n if onerror is not None:\n onerror(name)\n else:\n traceback.print_exc(file=sys.stderr)\n print("collect_submodules: failed to import %r!" % name, file=sys.stderr)\n else:\n path = getattr(sys.modules[name], \'__path__\', None) or []\n\n # don\'t traverse path items we\'ve seen before\n path = [p for p in path if not seen(p)]\n\n # Use Py2 code here. It still works in Py3.\n for item in walk_packages(path, name+\'.\', onerror):\n yield item\n # This is the original Py3 code.\n #yield from walk_packages(path, name+\'.\', onerror)\n\nfor module_loader, name, ispkg in walk_packages([\'c:\\\\users\\\\myuser\\\\appdata\\\\local\\\\programs\\\\python\\\\python39\\\\lib\\\\site-packages\\\\gevent\'], \'gevent.\'):\n print(\'\\n$_pyi:\' + name + \'*\')\n')' timed out after 60 seconds my imports: ``` import requests import os import discord from discord.ext import commands import sys import time import os import json import base64 import sqlite3 import win32crypt from Crypto.Cipher import AES import shutil from datetime import datetime, timedelta import re import time from urllib.request import Request, urlopen import requests import socket import cv2 from PIL import ImageGrab ```
kerem 2026-02-26 12:20:50 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@USPRPC commented on GitHub (Jan 23, 2022):

pls help

<!-- gh-comment-id:1019490281 --> @USPRPC commented on GitHub (Jan 23, 2022): pls help
Author
Owner

@brentvollebregt commented on GitHub (Jan 24, 2022):

Please add some context to this - there is no detail about what you have done, where you saw this or what this dump at the top is.

<!-- gh-comment-id:1019731406 --> @brentvollebregt commented on GitHub (Jan 24, 2022): Please add some context to this - there is no detail about what you have done, where you saw this or what this dump at the top is.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 26, 2022):

This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.

<!-- gh-comment-id:1079541279 --> @github-actions[bot] commented on GitHub (Mar 26, 2022): This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 31, 2022):

Closing issue due to no activity in more than 60 days.

<!-- gh-comment-id:1083904393 --> @github-actions[bot] commented on GitHub (Mar 31, 2022): Closing issue due to no activity in more than 60 days.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#212
No description provided.