semvec/pypi-packages huggingface dataset:
celery-dill-serializer 0.1.3
Dill serializer for Celery 4.0+
Keywords: celery,dill,serialization

celery_dill_serializer
======================

NameError when running serialized functions
-------------------------------------------

There are some issues with ``NameError`` when serialized functions depend on values defined outside of the scope of the ``def``.
Try putting imports and such inside the function definition, i.e.

.. code-block:: python

    def make_me_a_pi():
        import math
        return math.pi

as opposed to 

.. code-block:: python

    import math

    def make_me_a_pi():
        return math.pi

which would result in ``NameError: name 'math' is not defined``.