“2023年5月”存档文章有34

Windows Server 远程桌面出现“这可能是由于CredSSP加密数据库修正问题”解决方案

最近在安装完成 Windows Server 2012 R2 之后,设置远程登录之后,远程登录出现如下错误:出现身份验证错误。要求的函数不受支持远程计算机: 192.168.1.1这可能是由于 CredSSP 加密数据库修正。若要了解详细信息,请访问 https://go.microsoft.com/fwlink/?linkid=866660错误截图:出现这个问题的原因:凭据安全支持提供程序协议 ...

TypeError: unsupported operand type(s) for *: 'decimal.Decimal' and 'float'

在进行汇率计算的时候,出现了如下错误:TypeError: unsupported operand type(s) for *: 'decimal.Decimal' and 'float'出现错误的原因:无法对 Decimal 和 float 的两种不同数据类型进行乘法运算。具体错误代码如下:try: USD_CNY_exchange_rate = CurrencyExchangeUtil().g...

Invalid leading whitespace, reserved character(s), or returncharacter(s) in header value

在使用 requests 库的时候,设置了 headers,结果出现如下错误:requests.exceptions.InvalidHeader: Invalid leading whitespace, reserved character(s), or returncharacter(s) in header value: ' Mozilla/5.0 (Windows NT 10.0; Win6...

invalid request block size: 6774 (max 4096)...skip

再使用 uWSGI + nginx 的时候,url 中包含非常长的请求字符串的时候,服务器出现 502 Bad Gateway 的错误。才开始调整 nginx 的缓冲区大小,具体调整如下:proxy_buffers 8 256k; proxy_buffer_size 128k;重启 nginx 但是问题还是没有解决。同时查看 nginx 日志当中,有大量的错误,错误内容为:[error] 203...

window.location.href 页面无法跳转问题

使用 JavaScript window.location.href 的方式实现页面跳转,但是内容成功返回,页面没有跳转。下面是代码:window.location.href = `${res.url}?content=${res.content}`;上面 res.url 返回的是一个页面地址,而 res.content 返回的是需要传递的参数,包含 html 内容。下面是返回的内容示例:/pay...

Python 使用支付宝支付相关问题总结

最近需要支付宝支付,但是查询了官网和公开的一些资料,大部分是 Java 和 php 实现,使用 Python 实现的资料很少。在接入的过程中,参考了一些资料,中间遇到的一些问题,记录下来,方便其它人遇到同样的问题快速解决。首先我参考的是这篇文章:关于Python下的支付宝App支付,其中有几个地方需要注意的,如下:RSA 私钥的生成的这里,文章应该是 Windows 系统,在 Windows 系统...

ERROR: Failed building wheel for pycrypto

在使用 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 支付代码片段

下面是一个 Payssion 支付的代码片段,现在已经不用,公开出来,方便有需要的开发者。class PayssionUtil(object): def __init__(self): self._url = current_app.config['PAYSSION_URL'] self._api_key = current_app.config['PAYSSION_API_KEY'] self....