Skip to content

Multiprocessing: Serialization with Pickle #69

@JSchnepp

Description

@JSchnepp

Hi all,

I find it interesting that so far no one has a problem with serialization in multiprocessing using Pickle. After initialization in the following lines

   "" "
  Start writer as a new process
  "" "
 writer = InfluxDBWriter (queue_)

"writer" is started

 writer.start ()

and InfluxDBWriter must be serialized for pipe transfer. The following error message occurs:

File "/Users/joerg/miniconda3/envs/influx/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
ForkingPickler (file, protocol) .dump (obj)
AttributeError: Can't pickle local object 'PoolManager .__ init__. . '

This error is triggered by the line >>>>:
def init __ (self, queue):
Process .
init __ (self)
self.queue = queue

self.client = InfluxDBClient (url = 'http: // localhost: 9999',
token = "my_token", org = "my_org", debug = False)

Hardware: MacBook Pro, OS: Catalina
Python: 3.8.1
pypi: 2.1
influxdb-client: 1.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions