当前位置: 动力学知识库 > 问答 > 编程问答 >

python - Spark - boto endpoints.json 'Not a directory'

问题描述:

I have the following script (simplified) -

import boto.sqs

conn = boto.sqs.connect_to_region("my_region",aws_access_key_id="my_key",

aws_secret_access_key="my_secret")

messages = []

q = conn.get_queue("my_queue")

while True:

rs = q.get_messages(10)

if len(rs) == 0:

break

for m in rs:

print m

When I run it with - python test.py everything works as expected. When I run it with spark-submit --py-files deploy.zip test.zip I get -

[Errno 20] Not a directory:

'/home/ubuntu/scripts/deploy.zip/boto/endpoints.json

Although when I unzip deploy.zip it includes boto and endpoints.json inside. deploy.zip includes the requirements from my script (pip install -r req.txt -t lib and then zip)

Would appreciate any help, thanks in advance.

分享给朋友:
您可能感兴趣的文章:
随机阅读: