当我尝试def input_handler(data, context):
d = data.read().decode('utf-8')
body = json.loads(d)
s3path = body['s3_path']
s3 = S3FileSystem()
df = np.load(s3.open(s3path))
return df
一个新创建的flutter应用程序时,构建失败,并出现以下错误。该计算机是在一年前用于Flutter开发的,我怀疑某个地方的某些不规则配置会导致此错误。我已经为此苦苦挣扎了几天,任何帮助将不胜感激。
复制步骤
ERROR:python_service:exception handling request: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all(
Traceback (most recent call last):
File "/sagemaker/python_service.py", line 289, in _handle_invocation_post
res.body, res.content_type = self._handlers(data, context)
File "/sagemaker/python_service.py", line 322, in handler
response = requests.post(context.rest_uri, data=processed_input)
File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/requests/sessions.py", line 512, in request
data=data or
{}
,
flutter run
flutter create my_app
终端输出:
cd my_app
我已经尝试过:
flutter run
app/Frameworks/App.framework/App: signed bundle with Mach-O universal
(x86_64 arm64) [io.flutter.flutter.app]
/Users/user/Desktop/projects/myApp/build/ios/Debug-iphonesimulator/Runner.
app/Frameworks/Flutter.framework/Flutter: replacing existing signature
/Users/user/Desktop/projects/myApp/build/ios/Debug-iphonesimulator/Runner.
app/Frameworks/Flutter.framework/Flutter: Permission denied
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 11.
flutter clean
输出:
chmod +x
答案 0 :(得分:0)
答案 1 :(得分:0)
我终于能够解决此问题,并通过执行以下步骤在iOS模拟器上运行Flutter演示应用程序:
flutter version v1.11.0
(降级为Flutter的早期版本)flutter channel stable
flutter upgrade
flutter doctor
flutter create test_app
cd test_app
flutter run