可以本地打包docker后测试下访问。 看看是打包后的工作路径不对找不到具体文件还是怎么回事,gin也有日志输出的
微信云托管后端服务代理静态html 404本地可以访问到 发布到云托管就404 golang 后端服务 gin 框架 router.StaticFile("/package", "./static/index.html")
04-19从控制台终端进入实例,找可以把sqlite文件上传到某个地方的工具。 sqlite这种本地文件数据库会随着实例销毁而丢失的,需要避免使用。
云托管使用sqlite如何导出数据库文件?云托管部署小型的django项目,使用sqlite会在本地产生数据库文件,若发布之后数据库内的数据会变更,如何导出云托管部署docker内的sqlite数据库文件
04-19是的,不支持多个工程部署在同一环境中。建议不同工程拆分不同部署环境。
云托管的静态资源中是否可以部署多个vue工程?似乎只能在根目录中部署一个vue项目,index.html文件必须在根目录。我试图创建2个子目录,分别部署2个vue项目,然后会发现路由跳转有问题。想问下官方是否不支持多个工程的部署?
04-17是直接向云存储上传文件的?还是文件先上传云托管服务导致的报错? 如果直接向云存储上传文件,文件大小没有限制,可以使用分片上传。 如果上传文件到云托管服务,存在请求大小限制。 建议使用方案是直接前端获取到云存储的临时上传地址后直接从前端发起到云存储的文件上传。
云托管对象存储大小只有1M吗?这是云托管的限制吗?<html> <head> <title>413 Request Entity Too Large</title> </head> <body> <center> <h1>413 Request Entity Too Large</h1> </center> <hr> <center>nginx/1.17.8</center> </body> </html>
04-17要看看405的具体报错,是访问后的服务的方法错误还是什么
云托管静态资源一键部署是否可以部署VUE项目?我把dist包部署之后可以访问页面,但是访问后端接口报错405,本地访问正常,链接得域名是云托管服务测试地址
04-09除非开通和配置了环境共享,否则B账号的小程序是没有办法调用通A账号下的云开发资源的。要么B账号再次开通一个云开发环境,并在环境中重新上传部署云函数;要么配置A账号的云开发环境共享给到B小程序使用。
切换appid后云环境变量ID问题?A账号(appid)建立的有云开发小程序,切换成B账号,调用云函数,显示体验前需部署服务,捕捉到错误 Error: errCode: -501000 | errMsg: [100003] env not,这是因为环境ID没有填写或配置错误(官方文档也说明默认创建时环境ID),于是去app.js wx.cloud.init中手工赋值,保存,但还是同样错误,于是追踪云函数中env发现还是A账号的环境值,为什么呢?cloud.DYNAMIC_CURRENT_ENV没有取到更改后值
04-02看来都是pandas包本身的依赖
安一个pandas包,这个和什么有关系?[2024-04-02 13:22:04] Downloading https://mirrors.cloud.tencent.com/pypi/packages/b1/a7/824332581e258b5aa4f3763ecb2a797e5f9a54269044ba2e50ac19936b32/pandas-2.0.3.tar.gz (5.3 MB) [2024-04-02 13:22:05] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.3/5.3 MB 6.0 MB/s eta 0:00:00 [2024-04-02 13:22:06] Installing build dependencies: started [2024-04-02 13:22:13] Installing build dependencies: finished with status 'error' [2024-04-02 13:22:13] error: subprocess-exited-with-error [2024-04-02 13:22:13] [2024-04-02 13:22:13] × pip subprocess to install build dependencies did not run successfully. [2024-04-02 13:22:13] │ exit code: 1 [2024-04-02 13:22:13] ╰─> [319 lines of output] [2024-04-02 13:22:13] Looking in indexes: https://mirrors.cloud.tencent.com/pypi/simple [2024-04-02 13:22:13] Collecting setuptools>=61.0.0 [2024-04-02 13:22:13] Downloading https://mirrors.cloud.tencent.com/pypi/packages/92/e1/1c8bb3420105e70bdf357d57dd5567202b4ef8d27f810e98bb962d950834/setuptools-69.2.0-py3-none-any.whl (821 kB) [2024-04-02 13:22:13] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 821.5/821.5 kB 8.3 MB/s eta 0:00:00 [2024-04-02 13:22:13] Collecting wheel [2024-04-02 13:22:13] Downloading https://mirrors.cloud.tencent.com/pypi/packages/7d/cd/d7460c9a869b16c3dd4e1e403cce337df165368c71d6af229a74699622ce/wheel-0.43.0-py3-none-any.whl (65 kB) [2024-04-02 13:22:13] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.8/65.8 kB 5.5 MB/s eta 0:00:00 [2024-04-02 13:22:13] Collecting Cython<3,>=0.29.33 [2024-04-02 13:22:13] Downloading https://mirrors.cloud.tencent.com/pypi/packages/72/7b/977bec95d2dd10d5f04f79ff040d25c73313634f1cdb5ab3268742cc8dfa/Cython-0.29.37-cp38-cp38-musllinux_1_1_x86_64.whl (2.0 MB) [2024-04-02 13:22:13] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 9.5 MB/s eta 0:00:00 [2024-04-02 13:22:13] Collecting oldest-supported-numpy>=2022.8.16 [2024-04-02 13:22:13] Downloading https://mirrors.cloud.tencent.com/pypi/packages/dc/5c/e3c84cfdd488701aa074b22cf5bd227fb15d26e1d55a66d9088c39afa123/oldest_supported_numpy-2023.12.21-py3-none-any.whl (4.9 kB) [2024-04-02 13:22:13] Collecting versioneer[toml] [2024-04-02 13:22:13] Downloading https://mirrors.cloud.tencent.com/pypi/packages/b0/79/f0f1ca286b78f6f33c521a36b5cbd5bd697c0d66217d8856f443aeb9dd77/versioneer-0.29-py3-none-any.whl (46 kB) [2024-04-02 13:22:13] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.8/46.8 kB 3.8 MB/s eta 0:00:00 [2024-04-02 13:22:13] Collecting numpy==1.17.3 (from oldest-supported-numpy>=2022.8.16) [2024-04-02 13:22:13] Downloading https://mirrors.cloud.tencent.com/pypi/packages/b6/d6/be8f975f5322336f62371c9abeb936d592c98c047ad63035f1b38ae08efe/numpy-1.17.3.zip (6.4 MB) [2024-04-02 13:22:13] ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 9.1 MB/s eta 0:00:00 [2024-04-02 13:22:13] Preparing metadata (setup.py): started [2024-04-02 13:22:13] Preparing metadata (setup.py): finished with status 'done' [2024-04-02 13:22:13] Collecting tomli (from versioneer[toml]) [2024-04-02 13:22:13] Downloading https://mirrors.cloud.tencent.com/pypi/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl (12 kB) [2024-04-02 13:22:13] Building wheels for collected packages: numpy [2024-04-02 13:22:13] Building wheel for numpy (setup.py): started [2024-04-02 13:22:13] Building wheel for numpy (setup.py): finished with status 'error' [2024-04-02 13:22:13] error: subprocess-exited-with-error [2024-04-02 13:22:13] [2024-04-02 13:22:13] × python setup.py bdist_wheel did not run successfully. [2024-04-02 13:22:13] │ exit code: 1 [2024-04-02 13:22:13] ╰─> [263 lines of output] [2024-04-02 13:22:13] Running from numpy source directory. [2024-04-02 13:22:13] blas_opt_info: [2024-04-02 13:22:13] blas_mkl_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] blis_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries blis not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] openblas_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries openblas not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] atlas_3_10_blas_threads_info: [2024-04-02 13:22:13] Setting PTATLAS=ATLAS [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries tatlas not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] atlas_3_10_blas_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries satlas not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] atlas_blas_threads_info: [2024-04-02 13:22:13] Setting PTATLAS=ATLAS [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries ptf77blas,ptcblas,atlas not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] atlas_blas_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries f77blas,cblas,atlas not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] accelerate_info: [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] /tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/system_info.py:690: UserWarning: [2024-04-02 13:22:13] Optimized (vendor) Blas libraries are not found. [2024-04-02 13:22:13] Falls back to netlib Blas library which has worse performance. [2024-04-02 13:22:13] A better performance should be easily gained by switching [2024-04-02 13:22:13] Blas library. [2024-04-02 13:22:13] self.calc_info() [2024-04-02 13:22:13] blas_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries blas not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] /tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/system_info.py:690: UserWarning: [2024-04-02 13:22:13] Blas (http://www.netlib.org/blas/) libraries not found. [2024-04-02 13:22:13] Directories to search for the libraries can be specified in the [2024-04-02 13:22:13] numpy/distutils/site.cfg file (section [blas]) or by setting [2024-04-02 13:22:13] the BLAS environment variable. [2024-04-02 13:22:13] self.calc_info() [2024-04-02 13:22:13] blas_src_info: [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] /tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/system_info.py:690: UserWarning: [2024-04-02 13:22:13] Blas (http://www.netlib.org/blas/) sources not found. [2024-04-02 13:22:13] Directories to search for the sources can be specified in the [2024-04-02 13:22:13] numpy/distutils/site.cfg file (section [blas_src]) or by setting [2024-04-02 13:22:13] the BLAS_SRC environment variable. [2024-04-02 13:22:13] self.calc_info() [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] /bin/sh: svnversion: not found [2024-04-02 13:22:13] non-existing path in 'numpy/distutils': 'site.cfg' [2024-04-02 13:22:13] lapack_opt_info: [2024-04-02 13:22:13] lapack_mkl_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries mkl_rt not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] openblas_lapack_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries openblas not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] openblas_clapack_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries openblas,lapack not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] flame_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries flame not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] atlas_3_10_threads_info: [2024-04-02 13:22:13] Setting PTATLAS=ATLAS [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries lapack_atlas not found in /usr/local/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries tatlas,tatlas not found in /usr/local/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries lapack_atlas not found in /usr/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries tatlas,tatlas not found in /usr/lib [2024-04-02 13:22:13] <class 'numpy.distutils.system_info.atlas_3_10_threads_info'> [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] atlas_3_10_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries lapack_atlas not found in /usr/local/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries satlas,satlas not found in /usr/local/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries lapack_atlas not found in /usr/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries satlas,satlas not found in /usr/lib [2024-04-02 13:22:13] <class 'numpy.distutils.system_info.atlas_3_10_info'> [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] atlas_threads_info: [2024-04-02 13:22:13] Setting PTATLAS=ATLAS [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries lapack_atlas not found in /usr/local/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries lapack_atlas not found in /usr/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries ptf77blas,ptcblas,atlas not found in /usr/lib [2024-04-02 13:22:13] <class 'numpy.distutils.system_info.atlas_threads_info'> [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] atlas_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries lapack_atlas not found in /usr/local/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries f77blas,cblas,atlas not found in /usr/local/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries lapack_atlas not found in /usr/lib [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries f77blas,cblas,atlas not found in /usr/lib [2024-04-02 13:22:13] <class 'numpy.distutils.system_info.atlas_info'> [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] lapack_info: [2024-04-02 13:22:13] customize UnixCCompiler [2024-04-02 13:22:13] libraries lapack not found in ['/usr/local/lib', '/usr/lib'] [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] /tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/system_info.py:1712: UserWarning: [2024-04-02 13:22:13] Lapack (http://www.netlib.org/lapack/) libraries not found. [2024-04-02 13:22:13] Directories to search for the libraries can be specified in the [2024-04-02 13:22:13] numpy/distutils/site.cfg file (section [lapack]) or by setting [2024-04-02 13:22:13] the LAPACK environment variable. [2024-04-02 13:22:13] if getattr(self, '_calc_info_{}'.format(lapack))(): [2024-04-02 13:22:13] lapack_src_info: [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] /tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/system_info.py:1712: UserWarning: [2024-04-02 13:22:13] Lapack (http://www.netlib.org/lapack/) sources not found. [2024-04-02 13:22:13] Directories to search for the sources can be specified in the [2024-04-02 13:22:13] numpy/distutils/site.cfg file (section [lapack_src]) or by setting [2024-04-02 13:22:13] the LAPACK_SRC environment variable. [2024-04-02 13:22:13] if getattr(self, '_calc_info_{}'.format(lapack))(): [2024-04-02 13:22:13] NOT AVAILABLE [2024-04-02 13:22:13] [2024-04-02 13:22:13] /usr/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros' [2024-04-02 13:22:13] warnings.warn(msg) [2024-04-02 13:22:13] running bdist_wheel [2024-04-02 13:22:13] running build [2024-04-02 13:22:13] running config_cc [2024-04-02 13:22:13] unifing config_cc, config, build_clib, build_ext, build commands --compiler options [2024-04-02 13:22:13] running config_fc [2024-04-02 13:22:13] unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options [2024-04-02 13:22:13] running build_src [2024-04-02 13:22:13] build_src [2024-04-02 13:22:13] building py_modules sources [2024-04-02 13:22:13] creating build [2024-04-02 13:22:13] creating build/src.linux-x86_64-3.8 [2024-04-02 13:22:13] creating build/src.linux-x86_64-3.8/numpy [2024-04-02 13:22:13] creating build/src.linux-x86_64-3.8/numpy/distutils [2024-04-02 13:22:13] building library "npymath" sources [2024-04-02 13:22:13] get_default_fcompiler: matching types: '['gnu95', 'intel', 'lahey', 'pg', 'absoft', 'nag', 'vast', 'compaq', 'intele', 'intelem', 'gnu', 'g95', 'pathf95', 'nagfor']' [2024-04-02 13:22:13] customize Gnu95FCompiler [2024-04-02 13:22:13] Could not locate executable gfortran [2024-04-02 13:22:13] Could not locate executable f95 [2024-04-02 13:22:13] customize IntelFCompiler [2024-04-02 13:22:13] Could not locate executable ifort [2024-04-02 13:22:13] Could not locate executable ifc [2024-04-02 13:22:13] customize LaheyFCompiler [2024-04-02 13:22:13] Could not locate executable lf95 [2024-04-02 13:22:13] customize PGroupFCompiler [2024-04-02 13:22:13] Could not locate executable pgfortran [2024-04-02 13:22:13] customize AbsoftFCompiler [2024-04-02 13:22:13] Could not locate executable f90 [2024-04-02 13:22:13] Could not locate executable f77 [2024-04-02 13:22:13] customize NAGFCompiler [2024-04-02 13:22:13] customize VastFCompiler [2024-04-02 13:22:13] customize CompaqFCompiler [2024-04-02 13:22:13] Could not locate executable fort [2024-04-02 13:22:13] customize IntelItaniumFCompiler [2024-04-02 13:22:13] Could not locate executable efort [2024-04-02 13:22:13] Could not locate executable efc [2024-04-02 13:22:13] customize IntelEM64TFCompiler [2024-04-02 13:22:13] customize GnuFCompiler [2024-04-02 13:22:13] Could not locate executable g77 [2024-04-02 13:22:13] customize G95FCompiler [2024-04-02 13:22:13] Could not locate executable g95 [2024-04-02 13:22:13] customize PathScaleFCompiler [2024-04-02 13:22:13] Could not locate executable pathf95 [2024-04-02 13:22:13] customize NAGFORCompiler [2024-04-02 13:22:13] Could not locate executable nagfor [2024-04-02 13:22:13] don't know how to compile Fortran code on platform 'posix' [2024-04-02 13:22:13] C compiler: gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -fomit-frame-pointer -g -fno-semantic-interposition -DTHREAD_STACK_SIZE=0x100000 -fPIC [2024-04-02 13:22:13] [2024-04-02 13:22:13] compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/usr/include/python3.8 -c' [2024-04-02 13:22:13] gcc: _configtest.c [2024-04-02 13:22:13] failure. [2024-04-02 13:22:13] removing: _configtest.c _configtest.o [2024-04-02 13:22:13] Traceback (most recent call last): [2024-04-02 13:22:13] File "<string>", line 2, in <module> [2024-04-02 13:22:13] File "<pip-setuptools-caller>", line 34, in <module> [2024-04-02 13:22:13] File "/tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/setup.py", line 443, in <module> [2024-04-02 13:22:13] setup_package() [2024-04-02 13:22:13] File "/tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/setup.py", line 435, in setup_package [2024-04-02 13:22:13] setup(**metadata) [2024-04-02 13:22:13] File "/tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/core.py", line 171, in setup [2024-04-02 13:22:13] return old_setup(**new_attr) [2024-04-02 13:22:13] File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup [2024-04-02 13:22:13] return distutils.core.setup(**attrs) [2024-04-02 13:22:13] File "/usr/lib/python3.8/distutils/core.py", line 148, in setup [2024-04-02 13:22:13] dist.run_commands() [2024-04-02 13:22:13] File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands [2024-04-02 13:22:13] self.run_command(cmd) [2024-04-02 13:22:13] File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command [2024-04-02 13:22:13] cmd_obj.run() [2024-04-02 13:22:13] File "/usr/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 299, in run [2024-04-02 13:22:13] self.run_command('build') [2024-04-02 13:22:13] File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command [2024-04-02 13:22:13] self.distribution.run_command(command) [2024-04-02 13:22:13] File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command [2024-04-02 13:22:13] cmd_obj.run() [2024-04-02 13:22:13] File "/tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/command/build.py", line 47, in run [2024-04-02 13:22:13] old_build.run(self) [2024-04-02 13:22:13] File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run [2024-04-02 13:22:13] self.run_command(cmd_name) [2024-04-02 13:22:13] File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command [2024-04-02 13:22:13] self.distribution.run_command(command) [2024-04-02 13:22:13] File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command [2024-04-02 13:22:13] cmd_obj.run() [2024-04-02 13:22:13] File "/tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/command/build_src.py", line 142, in run [2024-04-02 13:22:13] self.build_sources() [2024-04-02 13:22:13] File "/tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/command/build_src.py", line 153, in build_sources [2024-04-02 13:22:13] self.build_library_sources(*libname_info) [2024-04-02 13:22:13] File "/tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/command/build_src.py", line 286, in build_library_sources [2024-04-02 13:22:13] sources = self.generate_sources(sources, (lib_name, build_info)) [2024-04-02 13:22:13] File "/tmp/pip-install-i4s00f1_/numpy_824c8d9dc1f443dc80f7ef603bee9172/numpy/distutils/command/build_src.py", line 369, in generate_sources [2024-04-02 13:22:13] source = func(extension, build_dir) [2024-04-02 13:22:13] File "numpy/core/setup.py", line 669, in get_mathlib_info [2024-04-02 13:22:13] raise RuntimeError("Broken toolchain: cannot link a simple C program") [2024-04-02 13:22:13] RuntimeError: Broken toolchain: cannot link a simple C program [2024-04-02 13:22:13] [end of output] [2024-04-02 13:22:13] [2024-04-02 13:22:13] note: This error originates from a subprocess, and is likely not a problem with pip. [2024-04-02 13:22:13] ERROR: Failed building wheel for numpy [2024-04-02 13:22:13] Running setup.py clean for numpy [2024-04-02 13:22:13] error: subprocess-exited-with-error [2024-04-02 13:22:13] [2024-04-02 13:22:13] × python setup.py clean did not run successfully. [2024-04-02 13:22:13] │ exit code: 1 [2024-04-02 13:22:13] ╰─> [10 lines of output] [2024-04-02 13:22:13] Running from numpy source directory. [2024-04-02 13:22:13] [2024-04-02 13:22:13] `setup.py clean` is not supported, use one of the following instead: [2024-04-02 13:22:13] [2024-04-02 13:22:13] - `git clean -xdf` (cleans all files) [2024-04-02 13:22:13] - `git clean -Xdf` (cleans all versioned files, doesn't touch [2024-04-02 13:22:13] files that aren't checked into the git repo) [2024-04-02 13:22:13] [2024-04-02 13:22:13] Add `--force` to your command to use it anyway if you must (unsupported). [2024-04-02 13:22:13] [2024-04-02 13:22:13] [end of output] [2024-04-02 13:22:13] [2024-04-02 13:22:13] note: This error originates from a subprocess, and is likely not a problem with pip. [2024-04-02 13:22:13] ERROR: Failed cleaning build dir for numpy [2024-04-02 13:22:13] Failed to build numpy [2024-04-02 13:22:13] ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects [2024-04-02 13:22:13] [end of output] [2024-04-02 13:22:13] [2024-04-02 13:22:13] note: This error originates from a subprocess, and is likely not a problem with pip. [2024-04-02 13:22:13] error: subprocess-exited-with-error [2024-04-02 13:22:13] [2024-04-02 13:22:13] × pip subprocess to install build dependencies did not run successfully. [2024-04-02 13:22:13] │ exit code: 1 [2024-04-02 13:22:13] ╰─> See above for output. [2024-04-02 13:22:13] [2024-04-02 13:22:13] note: This error originates from a subprocess, and is likely not a problem with pip. [2024-04-02 13:22:13] The command '/bin/sh -c pip config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple && pip config set global.trusted-host mirrors.cloud.tencent.com && pip install --upgrade pip && pip install --user -r requirements.txt' returned a non-zero code: 1 [2024-04-02 13:22:13] [Pipeline] } [2024-04-02 13:22:13] [Pipeline] // stage [2024-04-02 13:22:13] [Pipeline] stage [2024-04-02 13:22:13] [Pipeline] { (推送 Docker 镜像到 TCR) [2024-04-02 13:22:13] Stage "推送 Docker 镜像到 TCR" skipped due to earlier failure(s) [2024-04-02 13:22:13] [Pipeline] } [2024-04-02 13:22:13] [Pipeline] // stage [2024-04-02 13:22:13] [Pipeline] } [2024-04-02 13:22:13] [Pipeline] // node [2024-04-02 13:22:13] [Pipeline] End of Pipeline [2024-04-02 13:22:13] ERROR: script returned exit code 1 [2024-04-02 13:22:13] Finished: FAILURE *** -----------构建python-ai-proxy-054----------- 2024-04-02 13:21:36 create_build_image : succ,
04-02设计方式看起来有问题: 1、payCreateOrder 在创建订单时就应该写入数据库,且订单状态可以设置为支付未成功 2、payCallBack 在支付成功后,根据outTradeNo去查询订单,并修改订单状态为已支付 不应该在payCallBack中才去写数据库。回调仅是用于更新订单状态,标记支付成功还是失败的。
(已解决)如何正确使用cloudPay.unifiedOrder传参?Update(2024-4-8): 若初次接触可以参考这篇博客 https://www.cnblogs.com/masterchd/p/14840012.html Update(2024-4-3): 问题已解决,详情请看回复 --------------------------------------------------------------------- 以下为原文: 使用微信小程序+云开发,在页面confirm.js中调用payCreateOrder云函数,在payCreateOrder中调用API cloud.cloudPay.unifiedOrder()能够正确生成订单,且回调给confirm.js。小程序端微信支付相关组件也能成功支付。 但是,在unifiedOrder填入的回调云函数中,接收到的event对象中不包含outTradeNo, totalFee等关键信息,以至于影响到后续的对数据库的操作。 我的需求:在confirm.js中将cart购物车信息传给payCreateOrder云函数, 并且在该云函数中计算出价格、生成订单号、随机字符串等参数,调用unifiedOrder函数获取payment,传回给前端confirm.js并完成支付(到这里我都已经实现了),同时云函数payCallBack在订单支付完成后,将订单号、总金额、用户openid、购物车信息等作为一条记录新增到名为orderList的数据表中。(未实现,因为似乎无法从payCreateOrder中传参给payCallBack) // code1: confirm.js中处理支付的函数 onClickPay(ev) { // 微信支付 const cart = this.data.cart; wx.cloud.callFunction({ name: "payCreateOrder", data: { cart: cart //传入购物车信息 } }) .then(res => { // 成功生成订单,接下来准备支付 const payment = res.result.payment; console.log("payment: ", payment); wx.requestPayment({ ...payment //把payCreateOrder云函数的返回结果直接拿来用,不用再写一遍了 }) .then(payRes => { console.log("支付成功", payRes); }) .catch(payErr => { console.error("支付失败", payErr); }); }) .catch(err => { console.error("云函数调用失败", err); }); }, Code 2:payCreateOrder云函数代码 const cloud = require("wx-server-sdk"); cloud.init({ env:"xxxxxxxx" }); const db = cloud.database() function generateRandomString() { let result = ''; let characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let charactersLength = characters.length; for (let i = 0; i < 30; i++) { result += characters.charAt(Math.floor(Math.random() * charactersLength)); } return result; } function getCurrentTime() { //获取当前时间(精确到分钟) let now = new Date(); let year = now.getFullYear(); let month = (now.getMonth() + 1).toString().padStart(2, '0'); let day = now.getDate().toString().padStart(2, '0'); let hour = now.getHours().toString().padStart(2, '0'); let minute = now.getMinutes().toString().padStart(2, '0'); let dateTime = year + month + day + hour + minute return dateTime; } function generateOrderNo(){ const currentTime = getCurrentTime() //订单号的前12位为时间 const randSuffix = String( Math.floor(1000 + Math.random() * 9000) ) //订单号的后4位为数字 return ( currentTime+randSuffix ) } function serializeObject(obj) { try { return JSON.stringify(obj); } catch (error) { console.error("Error while serializing object:", error); return null; } } exports.main = async (event, context) => { const cart = event.cart; //获取从小程序端传入的cart对象 const res = await cloud.callFunction({ name: "QueryForCart", data: { cart: cart } }); /*这段代码略,计算总价,没有出现异步操作,且经过检查,生成的total是正确无误的*/ total = parseInt(total * 100) //转换为分,整数 //得到总价total以后,开始调用unifiedOrder微信支付 const randomStr = generateRandomString(); const orderNo = generateOrderNo(); return await cloud.cloudPay.unifiedOrder({ "functionName": "payCallBack", //回调云函数 "envId": "xxxxx", "subMchId": "xxxxxxxxx", "nonceStr": randomStr, "body": "bodybodybodybody", "outTradeNo": orderNo, "totalFee": total, //应付金额 "spbillCreateIp": "127.0.0.1", "tradeType": "JSAPI" //微信小程序调起支付 }) }; 代码3: payCallBack 云函数 // payReturn const cloud = require('wx-server-sdk') cloud.init({ env:"xxxxxxxxxx"}) // 使用当前云环境 const db = cloud.database() // 云函数入口函数 exports.main = async (event, context) => { const r = await cloud.database().collection('log').add({ data:{ log:event //将event对象存入数据库中,方便查看(详情见图3) } }) return {errcode:0, errmsg:"ok"}; } 图1: 支付成功后[图片] 图2:payCreateOrder云函数日志 [图片] 图3: 回调云函数payCallBack的event对象(我把它存入了数据库中) [图片]
03-29服务是否启动成功;启动成功的情况下,请求的路径是否在服务内正确处理了;
微信云托管发布项目后,所给地址报404?微信云托管发布项目后,公网域名访问,报404?为什么呢?创建项目的时候,外网设置也勾选了。。。 求助大神,,,
03-29这个费用是IP的使用费用,由于微信支付未提供转账到零钱接口到开放接口服务,所以需要使用公网来发起请求。
小程序使用云托管,调用商家转账到零钱,云托管微信支付免授权没有这个接口,怎么解决?本来使用云托管就是为了简化授权以及减轻服务器负担,商家转账到零钱 这个功能为何单独收费?49一个月?有点坑了啊 需要配置ip白名单。
03-29