Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/301.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python数据流作业在部署时使用requirements\u file参数后不接受来自PubSubcription的消息_Python_Google Cloud Platform_Google Cloud Dataflow_Dataflow - Fatal编程技术网

python数据流作业在部署时使用requirements\u file参数后不接受来自PubSubcription的消息

python数据流作业在部署时使用requirements\u file参数后不接受来自PubSubcription的消息,python,google-cloud-platform,google-cloud-dataflow,dataflow,Python,Google Cloud Platform,Google Cloud Dataflow,Dataflow,在写入大查询之前,我想使用dataflow作业对来自pubsub订阅的消息进行加密。我使用pycryptodome==3.9.8,cryptography==3.1 python库来实现这一点 在数据流作业中,我使用以下两种导入 从加密导入随机 从Crypto.Cipher导入AES 当我尝试在没有--requirements\u文件参数的情况下部署数据流管道时。它可以完美地部署,但在将消息发布到主题后,它会抛出一个错误 ModuleNotFoundError:没有名为“Crypto”的模块[在

在写入大查询之前,我想使用dataflow作业对来自pubsub订阅的消息进行加密。我使用pycryptodome==3.9.8,cryptography==3.1 python库来实现这一点

在数据流作业中,我使用以下两种导入

从加密导入随机 从Crypto.Cipher导入AES

当我尝试在没有--requirements\u文件参数的情况下部署数据流管道时。它可以完美地部署,但在将消息发布到主题后,它会抛出一个错误

ModuleNotFoundError:没有名为“Crypto”的模块[在运行“GeneratedPtTransform-81”时]

之后,我尝试使用--requirements\u file requirement.txt标志再次部署管道。 数据流管道部署正常,但现在它不接受来自订阅的任何消息。数据流作业中没有错误,因为它没有获取消息


我错过什么了吗?由于没有日志,很难识别。

重新发布@peter kim的评论作为回答:使用
setup.py
文件,您应该能够完成您需要的操作。请参见

我在使用需求文件时也经历过同样的情况。解决方法是使用setup.py