invalid request block size: 6774 (max 4096)...skip
2023年05月26日 ,作者: 黄兵
再使用 uWSGI + nginx 的时候,url 中包含非常长的请求字符串的时候,服务器出现 502 Bad Gateway 的错误。才开始调整 nginx 的缓冲区大小,具体调整如下:proxy_buffers 8 256k; proxy_buffer_size 128k;重启 nginx 但是问题还是没有解决。同时查看 nginx 日志当中,有大量的错误,错误内容为:[error] 203...
window.location.href 页面无法跳转问题
2023年05月26日 ,作者: 黄兵
使用 JavaScript window.location.href 的方式实现页面跳转,但是内容成功返回,页面没有跳转。下面是代码:window.location.href = `${res.url}?content=${res.content}`;上面 res.url 返回的是一个页面地址,而 res.content 返回的是需要传递的参数,包含 html 内容。下面是返回的内容示例:/pay...
Python 使用支付宝支付相关问题总结
2023年05月25日 ,作者: 黄兵
最近需要支付宝支付,但是查询了官网和公开的一些资料,大部分是 Java 和 php 实现,使用 Python 实现的资料很少。在接入的过程中,参考了一些资料,中间遇到的一些问题,记录下来,方便其它人遇到同样的问题快速解决。首先我参考的是这篇文章:关于Python下的支付宝App支付,其中有几个地方需要注意的,如下:RSA 私钥的生成的这里,文章应该是 Windows 系统,在 Windows 系统...
ERROR: Failed building wheel for pycrypto
2023年05月25日 ,作者: 黄兵
在使用 pip 安装 pycrypto 的时候:pip install pycrypto出现了如下错误:note: This error originates from a subprocess, and is likely not a problem with pip.ERROR: Failed building wheel for pycryptoRunning setup.py clean ...
Payssion 支付代码片段
2023年05月25日 ,作者: 黄兵
下面是一个 Payssion 支付的代码片段,现在已经不用,公开出来,方便有需要的开发者。class PayssionUtil(object): def __init__(self): self._url = current_app.config['PAYSSION_URL'] self._api_key = current_app.config['PAYSSION_API_KEY'] self....
Top 10 Free Sites to Receive SMS Online Without Real Phone Number
2023年05月24日 ,作者: 黄兵
Imagine the inconvenience of having to provide your email address every time you want to sign up for a service on a website or participate in a forum discussion. Many people find this frustrating beca...
AttributeError: 'function' object has no attribute 'route'
2023年05月24日 ,作者: 黄兵
今天新增一个 Flask 中的蓝图,结果报如下错误:AttributeError: 'function' object has no attribute 'route'具体代码如下:#!/usr/bin/env python # -*- coding: UTF-8 -*- from flask import render_template, g from . import product ...
MySQL - 如何修复 Incorrect string value 错误
2023年05月19日 ,作者: 黄兵
当您尝试向MySQL数据库表插入新记录时,您可能会遇到一个错误,其中包含描述的UTF-8十六进制代码,错误消息为"Incorrect string value"。例如,假设您创建了一个名为Test的表,只有一个列,如下所示:CREATE TABLE `Test` ( `names` varchar(255) ) 接下来,让我们将以下埃及象形文字字符插入到表中:INSERT INTO Test ...