AttributeError: у объекта 'module' нет атрибута '_Condition' в скрипте - PullRequest
0 голосов
/ 20 мая 2019

Я пытаюсь получить доступ к объекту AWS S3, используя boto3 из python.

Я дал AWS учетные данные.Однако место, где я использую boto3 API boto3.client('S3') для доступа к S3 ресурсу, вызывает ошибку атрибута.Ниже приведен фрагмент кода:

import sys
sys.path.append('/usr/lib/python2.7/dist-packages')
sys.path.append('/usr/local/lib/python2.7/dist-packages')
import jsonschema
import boto3
s3 = boto3.client('s3')
s3client = boto3.client('s3')

Не могли бы вы помочь мне, как я могу преодолеть эту ошибку.

Пожалуйста, найдите ниже для трассировки стека:

 Script error while processing batch: javax.script.ScriptException: AttributeError: 'module' object has no attribute '_Condition' in <script> at line number 9
com.streamsets.pipeline.api.StageException: SCRIPTING_06 - Script error while processing batch: javax.script.ScriptException: AttributeError: 'module' object has no attribute '_Condition' in <script> at line number 9
    at com.streamsets.pipeline.stage.processor.scripting.AbstractScriptingProcessor.runScript(AbstractScriptingProcessor.java:256)
    at com.streamsets.pipeline.stage.processor.scripting.AbstractScriptingProcessor.runBatch(AbstractScriptingProcessor.java:237)
    at com.streamsets.pipeline.stage.processor.scripting.AbstractScriptingProcessor.process(AbstractScriptingProcessor.java:214)
    at com.streamsets.pipeline.api.base.SingleLaneProcessor.process(SingleLaneProcessor.java:95)
    at com.streamsets.pipeline.api.base.configurablestage.DProcessor.process(DProcessor.java:35)
    at com.streamsets.datacollector.runner.StageRuntime.lambda$execute$2(StageRuntime.java:286)
    at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:235)
    at com.streamsets.datacollector.runner.StageRuntime.execute(StageRuntime.java:298)
    at com.streamsets.datacollector.runner.StagePipe.process(StagePipe.java:219)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.processPipe(ProductionPipelineRunner.java:810)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.lambda$executeRunner$3(ProductionPipelineRunner.java:854)
    at com.streamsets.datacollector.runner.PipeRunner.acceptConsumer(PipeRunner.java:221)
    at com.streamsets.datacollector.runner.PipeRunner.executeBatch(PipeRunner.java:142)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.executeRunner(ProductionPipelineRunner.java:853)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.runSourceLessBatch(ProductionPipelineRunner.java:831)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.runPollSource(ProductionPipelineRunner.java:569)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunner.run(ProductionPipelineRunner.java:383)
    at com.streamsets.datacollector.runner.Pipeline.run(Pipeline.java:527)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipeline.run(ProductionPipeline.java:109)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunnable.run(ProductionPipelineRunnable.java:75)
    at com.streamsets.datacollector.execution.runner.standalone.StandaloneRunner.start(StandaloneRunner.java:703)
    at com.streamsets.datacollector.execution.runner.common.AsyncRunner.lambda$start$3(AsyncRunner.java:151)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226)
    at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:226)
    at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:222)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at com.streamsets.datacollector.metrics.MetricSafeScheduledExecutorService$MetricsTask.run(MetricSafeScheduledExecutorService.java:100)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
Caused by: javax.script.ScriptException: AttributeError: 'module' object has no attribute '_Condition' in <script> at line number 9
    at org.python.jsr223.PyScriptEngine.scriptException(PyScriptEngine.java:222)
    at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:59)
    at org.python.jsr223.PyScriptEngine.access$300(PyScriptEngine.java:20)
    at org.python.jsr223.PyScriptEngine$PyCompiledScript.eval(PyScriptEngine.java:250)
    at javax.script.CompiledScript.eval(CompiledScript.java:92)
    at com.streamsets.pipeline.stage.processor.scripting.AbstractScriptingProcessor.runScript(AbstractScriptingProcessor.java:285)
    at com.streamsets.pipeline.stage.processor.scripting.AbstractScriptingProcessor.runScript(AbstractScriptingProcessor.java:242)
    ... 34 more
Caused by: Traceback (most recent call last):
  File "<script>", line 9, in <module>
  File "/usr/local/lib/python2.7/dist-packages/boto3/__init__.py", line 100, in resource
    return _get_default_session().resource(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/boto3/session.py", line 384, in resource
    client = self.client(
  File "/usr/local/lib/python2.7/dist-packages/boto3/session.py", line 258, in client
    return self._session.create_client(
  File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 834, in create_client
    client = client_creator.create_client(
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 80, in create_client
    cls = self._create_client_class(service_name, service_model)
  File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 107, in _create_client_class
    self._event_emitter.emit(
  File "/usr/local/lib/python2.7/dist-packages/botocore/hooks.py", line 356, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/hooks.py", line 228, in emit
    return self._emit(event_name, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/botocore/hooks.py", line 211, in _emit
    response = handler(**kwargs)
  File "/usr/local/lib/python2.7/dist-packages/boto3/utils.py", line 61, in _handler
    module = import_module(module)
  File "/usr/local/lib/python2.7/dist-packages/boto3/utils.py", line 52, in import_module
    __import__(name)
  File "/usr/local/lib/python2.7/dist-packages/boto3/s3/inject.py", line 15, in <module>
    from boto3.s3.transfer import create_transfer_manager
  File "/usr/local/lib/python2.7/dist-packages/boto3/s3/transfer.py", line 127, in <module>
    from s3transfer.exceptions import RetriesExceededError as \
  File "/usr/local/lib/python2.7/dist-packages/s3transfer/__init__.py", line 134, in <module>
    import concurrent.futures
  File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/__init__.py", line 17, in <module>
    from concurrent.futures.thread import ThreadPoolExecutor
  File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/thread.py", line 15, in <module>
    from multiprocessing import cpu_count
  File "/usr/local/lib/python2.7/dist-packages/concurrent/futures/thread.py", line 15, in <module>
    from multiprocessing import cpu_count
  File "/usr/local/lib/python2.7/dist-packages/multiprocessing/__init__.py", line 64, in <module>
    import multiprocessing.patch
  File "/usr/local/lib/python2.7/dist-packages/multiprocessing/patch.py", line 58, in <module>
    class ConditionPatch(object):
  File "/usr/local/lib/python2.7/dist-packages/multiprocessing/patch.py", line 61, in ConditionPatch
    notify_all = threading._Condition.notifyAll.im_func
AttributeError: 'module' object has no attribute '_Condition'

    at org.python.core.Py.AttributeError(Py.java:207)
    at org.python.core.PyObject.noAttributeError(PyObject.java:1032)
    at org.python.core.PyObject.__getattr__(PyObject.java:1027)
    at multiprocessing.patch$py.ConditionPatch$6(/usr/local/lib/python2.7/dist-packages/multiprocessing/patch.py:61)
    at multiprocessing.patch$py.call_function(/usr/local/lib/python2.7/dist-packages/multiprocessing/patch.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.Py.makeClass(Py.java:2066)
    at org.python.core.Py.makeClass(Py.java:2060)
    at multiprocessing.patch$py.f$0(/usr/local/lib/python2.7/dist-packages/multiprocessing/patch.py:64)
    at multiprocessing.patch$py.call_function(/usr/local/lib/python2.7/dist-packages/multiprocessing/patch.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.imp.createFromCode(imp.java:436)
    at org.python.core.imp.createFromSource(imp.java:396)
    at org.python.core.imp.loadFromSource(imp.java:667)
    at org.python.core.imp.find_module(imp.java:551)
    at org.python.core.PyModule.impAttr(PyModule.java:111)
    at org.python.core.imp.import_next(imp.java:840)
    at org.python.core.imp.import_logic(imp.java:905)
    at org.python.core.imp.import_module_level(imp.java:970)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:450)
    at org.python.core.__builtin__.__import__(__builtin__.java:1232)
    at org.python.core.imp.importOne(imp.java:1076)
    at multiprocessing$py.f$0(/usr/local/lib/python2.7/dist-packages/multiprocessing/__init__.py:278)
    at multiprocessing$py.call_function(/usr/local/lib/python2.7/dist-packages/multiprocessing/__init__.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.imp.createFromCode(imp.java:436)
    at org.python.core.imp.createFromSource(imp.java:396)
    at org.python.core.imp.loadFromSource(imp.java:667)
    at org.python.core.imp.find_module(imp.java:551)
    at org.python.core.imp.import_next(imp.java:838)
    at org.python.core.imp.import_first(imp.java:872)
    at org.python.core.imp.import_module_level(imp.java:964)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:450)
    at org.python.core.__builtin__.__import__(__builtin__.java:1232)
    at org.python.core.imp.importFromAs(imp.java:1149)
    at org.python.core.imp.importFrom(imp.java:1124)
    at concurrent.futures.thread$py.f$0(/usr/local/lib/python2.7/dist-packages/concurrent/futures/thread.py:93)
    at concurrent.futures.thread$py.call_function(/usr/local/lib/python2.7/dist-packages/concurrent/futures/thread.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.imp.createFromCode(imp.java:436)
    at org.python.core.imp.createFromSource(imp.java:396)
    at org.python.core.imp.loadFromSource(imp.java:667)
    at org.python.core.imp.find_module(imp.java:551)
    at org.python.core.PyModule.impAttr(PyModule.java:111)
    at org.python.core.imp.import_next(imp.java:840)
    at org.python.core.imp.import_logic(imp.java:905)
    at org.python.core.imp.import_module_level(imp.java:970)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:450)
    at org.python.core.__builtin__.__import__(__builtin__.java:1232)
    at org.python.core.imp.importFromAs(imp.java:1149)
    at org.python.core.imp.importFrom(imp.java:1124)
    at concurrent.futures$py.f$0(/usr/local/lib/python2.7/dist-packages/concurrent/futures/__init__.py:23)
    at concurrent.futures$py.call_function(/usr/local/lib/python2.7/dist-packages/concurrent/futures/__init__.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.imp.createFromCode(imp.java:436)
    at org.python.core.imp.createFromSource(imp.java:396)
    at org.python.core.imp.loadFromSource(imp.java:667)
    at org.python.core.imp.find_module(imp.java:551)
    at org.python.core.PyModule.impAttr(PyModule.java:111)
    at org.python.core.imp.import_next(imp.java:840)
    at org.python.core.imp.import_logic(imp.java:905)
    at org.python.core.imp.import_module_level(imp.java:970)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:450)
    at org.python.core.__builtin__.__import__(__builtin__.java:1232)
    at org.python.core.imp.importOne(imp.java:1076)
    at s3transfer$py.f$0(/usr/local/lib/python2.7/dist-packages/s3transfer/__init__.py:582)
    at s3transfer$py.call_function(/usr/local/lib/python2.7/dist-packages/s3transfer/__init__.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.imp.createFromCode(imp.java:436)
    at org.python.core.imp.createFromSource(imp.java:396)
    at org.python.core.imp.loadFromSource(imp.java:667)
    at org.python.core.imp.find_module(imp.java:551)
    at org.python.core.imp.import_next(imp.java:838)
    at org.python.core.imp.import_first(imp.java:872)
    at org.python.core.imp.import_module_level(imp.java:964)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:450)
    at org.python.core.__builtin__.__import__(__builtin__.java:1232)
    at org.python.core.imp.importFromAs(imp.java:1149)
    at org.python.core.imp.importFrom(imp.java:1124)
    at boto3.s3.transfer$py.f$0(/usr/local/lib/python2.7/dist-packages/boto3/s3/transfer.py:328)
    at boto3.s3.transfer$py.call_function(/usr/local/lib/python2.7/dist-packages/boto3/s3/transfer.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.imp.createFromCode(imp.java:436)
    at org.python.core.imp.createFromSource(imp.java:396)
    at org.python.core.imp.loadFromSource(imp.java:667)
    at org.python.core.imp.find_module(imp.java:551)
    at org.python.core.PyModule.impAttr(PyModule.java:111)
    at org.python.core.imp.import_next(imp.java:840)
    at org.python.core.imp.import_logic(imp.java:905)
    at org.python.core.imp.import_module_level(imp.java:970)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:450)
    at org.python.core.__builtin__.__import__(__builtin__.java:1232)
    at org.python.core.imp.importFromAs(imp.java:1149)
    at org.python.core.imp.importFrom(imp.java:1124)
    at boto3.s3.inject$py.f$0(/usr/local/lib/python2.7/dist-packages/boto3/s3/inject.py:723)
    at boto3.s3.inject$py.call_function(/usr/local/lib/python2.7/dist-packages/boto3/s3/inject.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.imp.createFromCode(imp.java:436)
    at org.python.core.imp.createFromSource(imp.java:396)
    at org.python.core.imp.loadFromSource(imp.java:667)
    at org.python.core.imp.find_module(imp.java:551)
    at org.python.core.PyModule.impAttr(PyModule.java:111)
    at org.python.core.imp.import_next(imp.java:840)
    at org.python.core.imp.import_logic(imp.java:905)
    at org.python.core.imp.import_module_level(imp.java:970)
    at org.python.core.imp.importName(imp.java:1057)
    at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
    at org.python.core.PyObject.__call__(PyObject.java:480)
    at org.python.core.PyObject.__call__(PyObject.java:484)
    at boto3.utils$py.import_module$2(/usr/local/lib/python2.7/dist-packages/boto3/utils.py:53)
    at boto3.utils$py.call_function(/usr/local/lib/python2.7/dist-packages/boto3/utils.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:139)
    at org.python.core.PyFunction.__call__(PyFunction.java:413)
    at boto3.utils$py._handler$4(/usr/local/lib/python2.7/dist-packages/boto3/utils.py:63)
    at boto3.utils$py.call_function(/usr/local/lib/python2.7/dist-packages/boto3/utils.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyFunction.function___call__(PyFunction.java:471)
    at org.python.core.PyFunction.__call__(PyFunction.java:466)
    at org.python.core.PyFunction.__call__(PyFunction.java:461)
    at org.python.core.PyObject._callextra(PyObject.java:620)
    at botocore.hooks$py._emit$15(/usr/local/lib/python2.7/dist-packages/botocore/hooks.py:215)
    at botocore.hooks$py.call_function(/usr/local/lib/python2.7/dist-packages/botocore/hooks.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:162)
    at org.python.core.PyFunction.__call__(PyFunction.java:434)
    at org.python.core.PyMethod.__call__(PyMethod.java:156)
    at botocore.hooks$py.emit$16(/usr/local/lib/python2.7/dist-packages/botocore/hooks.py:228)
    at botocore.hooks$py.call_function(/usr/local/lib/python2.7/dist-packages/botocore/hooks.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
    at org.python.core.PyFunction.__call__(PyFunction.java:482)
    at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
    at org.python.core.PyMethod.__call__(PyMethod.java:228)
    at org.python.core.PyMethod.__call__(PyMethod.java:223)
    at org.python.core.PyObject._callextra(PyObject.java:620)
    at botocore.hooks$py.emit$26(/usr/local/lib/python2.7/dist-packages/botocore/hooks.py:356)
    at botocore.hooks$py.call_function(/usr/local/lib/python2.7/dist-packages/botocore/hooks.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
    at org.python.core.PyFunction.__call__(PyFunction.java:482)
    at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
    at org.python.core.PyMethod.__call__(PyMethod.java:228)
    at botocore.client$py._create_client_class$5(/usr/local/lib/python2.7/dist-packages/botocore/client.py:113)
    at botocore.client$py.call_function(/usr/local/lib/python2.7/dist-packages/botocore/client.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:171)
    at org.python.core.PyFunction.__call__(PyFunction.java:434)
    at org.python.core.PyMethod.__call__(PyMethod.java:156)
    at botocore.client$py.create_client$3(/usr/local/lib/python2.7/dist-packages/botocore/client.py:95)
    at botocore.client$py.call_function(/usr/local/lib/python2.7/dist-packages/botocore/client.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
    at org.python.core.PyFunction.__call__(PyFunction.java:482)
    at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
    at org.python.core.PyMethod.__call__(PyMethod.java:228)
    at botocore.session$py.create_client$49(/usr/local/lib/python2.7/dist-packages/botocore/session.py:842)
    at botocore.session$py.call_function(/usr/local/lib/python2.7/dist-packages/botocore/session.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
    at org.python.core.PyFunction.__call__(PyFunction.java:482)
    at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
    at org.python.core.PyMethod.__call__(PyMethod.java:228)
    at boto3.session$py.client$14(/usr/local/lib/python2.7/dist-packages/boto3/session.py:258)
    at boto3.session$py.call_function(/usr/local/lib/python2.7/dist-packages/boto3/session.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
    at org.python.core.PyFunction.__call__(PyFunction.java:482)
    at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
    at org.python.core.PyMethod.__call__(PyMethod.java:228)
    at boto3.session$py.resource$15(/usr/local/lib/python2.7/dist-packages/boto3/session.py:408)
    at boto3.session$py.call_function(/usr/local/lib/python2.7/dist-packages/boto3/session.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:199)
    at org.python.core.PyFunction.__call__(PyFunction.java:482)
    at org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
    at org.python.core.PyMethod.__call__(PyMethod.java:228)
    at org.python.core.PyMethod.__call__(PyMethod.java:223)
    at org.python.core.PyObject._callextra(PyObject.java:620)
    at boto3$py.resource$5(/usr/local/lib/python2.7/dist-packages/boto3/__init__.py:100)
    at boto3$py.call_function(/usr/local/lib/python2.7/dist-packages/boto3/__init__.py)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
    at org.python.core.PyBaseCode.call(PyBaseCode.java:132)
    at org.python.core.PyFunction.__call__(PyFunction.java:413)
    at org.python.pycode._pyx1347.f$0(<script>:16)
    at org.python.pycode._pyx1347.call_function(<script>)
    at org.python.core.PyTableCode.call(PyTableCode.java:171)
    at org.python.core.PyCode.call(PyCode.java:18)
    at org.python.core.Py.runCode(Py.java:1614)
    at org.python.core.__builtin__.eval(__builtin__.java:497)
    at org.python.core.__builtin__.eval(__builtin__.java:501)
    at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:259)
    at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:57)
    ... 39 more

1 Ответ

0 голосов
/ 21 мая 2019

Согласно быстрому запуску Boto 3 , вызов должен быть

s3 = boto3.resource('s3')
...