8000 RuntimeError: cannot schedule new futures after interpreter shutdown for python 3.9+ · Issue #38 · amplitude/Amplitude-Python · GitHub
[go: up one dir, main page]

Skip to content
RuntimeError: cannot schedule new futures after interpreter shutdown for python 3.9+ #38
@konradzagozda

Description

@konradzagozda

Current Behavior

I got this stack trace when I wanted to follow SDK intro using python 3.9 or 3.10 - resulting in event not being sent

/home/konrad/PycharmProjects/pythonProject10/venv/bin/python /home/konrad/PycharmProjects/pythonProject10/main.py 
Consumer thread error
Traceback (most recent call last):
  File "/home/konrad/PycharmProjects/pythonProject10/venv/lib/python3.10/site-packages/amplitude/worker.py", line 76, in buffer_consumer
    self.threads_pool.submit(self.send, events)
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 169, in submit
    raise RuntimeError('cannot schedule new futures after '
RuntimeError: cannot schedule new futures after interpreter shutdown

Process finished with exit code 0

Possible Solution

There are workarounds like these https://stackoverflow.com/questions/70673175/runtimeerror-cannot-schedule-new-futures-after-interpreter-shutdown
but I think I should be able to follow introduction without going into these

Steps to reproduce

  1. create new project with python 3.9 3.10
  2. install amplitude analytics
  3. paste into main:
from amplitude import *


client = Amplitude('785b2b6680dd0758b2ca0511441dd9e5');

client.track(BaseEvent(
    event_type='Python Event',
    user_id='datamonster@gmail.com',
    ip='127.0.0.1',
    event_properties={
        'keyString': 'valueString',
        'keyInt': 11,
        'keyBool': True
    }
))

  1. run

Environment

  • SDK Version: amplitude-analytics==1.1.0
  • Python Version: 3.9 or 3.10
  • OS Info: Ubuntu 20.04

I don't know if this is related to the way I run the script? Does that mean python 3.9 and 3.10 are not supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0