# Getting the error in executing the tasks in parallel

**URL:** https://dask.discourse.group/t/getting-the-error-in-executing-the-tasks-in-parallel/276
**Category:** Distributed
**Tags:** delayed
**Created:** [January 24, 2022, 5:03pm UTC](https://dask.discourse.group/t/getting-the-error-in-executing-the-tasks-in-parallel/276 "2022-01-24T17:03:28Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![pavithraes](https://yyz1.discourse-cdn.com/flex035/user_avatar/dask.discourse.group/pavithraes/32/14_2.png) [@pavithraes](https://dask.discourse.group/u/pavithraes)
#### Post date: [February 15, 2022, 4:12pm UTC](https://dask.discourse.group/t/getting-the-error-in-executing-the-tasks-in-parallel/276/8 "2022-02-15T16:12:32Z")

</div>

@GosainRohit Thank you for the traceback!

`AttributeError: Can’t pickle local object ‘create_engine..connect’` suggests your code might be trying to pickle the connection to your database.

I think something outside the code snippet you’re shared is causing this. In [your code](https://dask.discourse.group/t/getting-the-error-in-executing-the-tasks-in-parallel/276/3), what does `engine` refer to? Perhaps it’s related to how you’re reading the files with Delayed (i.e., the `read_dell_fiscal_calendar_for_days` function)?

We really would need a reproducible example to diagnose this further.

The following links might be helpful:

- [Dask Dataframe and SQL — Dask documentation](https://docs.dask.org/en/stable/dataframe-sql.html#delayed-functions)
- [How to provide SSL details in the ddf.to\_sql function?](https://dask.discourse.group/t/how-to-provide-ssl-details-in-the-ddf-to-sql-function/206)

Also, sorry for the delay in response!

---

_[View the full topic](https://dask.discourse.group/t/getting-the-error-in-executing-the-tasks-in-parallel/276)._
