Two different Amplitude
instances send event to the same project
#45
Labels
bug
Something isn't working
Amplitude
instances send event to the same project
#45
Consider this sample code:
Expected Behavior
client_a.track(...)
sends the event to PROJECT_ACurrent Behavior
client_a.track(...)
sends the event to PROJECT_BPossible Solution
Don't use mutable defaults in function arguments as they are shared across all class instances:
Amplitude-Python/src/amplitude/client.py
Line 40 in ec79070
Amplitude-Python/src/amplitude/client.py
Lines 48 to 49 in ec79070
Can be replaced with something like:
Possible workaround for now is to specify different config instances explicitly:
Another possible bug with this scenario might be here (didn't check):
Amplitude-Python/src/amplitude/config.py
Line 58 in ec79070
Environment
amplitude-analytics==1.1.0
The text was updated successfully, but these errors were encountered: