ubuntu uwsgi 服务器启动之后 链接服务器提示500, 查看系统日志发现没有找到django模块。但是通过pip命令可以看到已经成功安装了。
猜测可能是python路径搜索问题导致的,随便搜了一下找到这么一篇文章:https://blog.csdn.net/dqchouyang/article/details/78762432
ubuntu uwsgi 服务器启动之后 链接服务器提示500, 查看系统日志发现没有找到django模块。但是通过pip命令可以看到已经成功安装了。
猜测可能是python路径搜索问题导致的,随便搜了一下找到这么一篇文章:https://blog.csdn.net/dqchouyang/article/details/78762432
安装vs相关工具之后继续报错:
warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
building ‘Crypto.Random.OSRNG.winrandom‘ extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Isrc/ -Isrc/inc-msvc/ -IC:\Python36\include -IC:\Python36\include
winrand.c
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(26): error C2061: syntax error: identifier ‘intmax_t‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2061: syntax error: identifier ‘rem‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(27): error C2059: syntax error: ‘;‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(28): error C2059: syntax error: ‘}‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2061: syntax error: identifier ‘imaxdiv_t‘
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\inttypes.h(30): error C2059: syntax error: ‘;‘
import json
import requests
SAND_BOX_VERIFY_URL = 'https://sandbox.itunes.apple.com/verifyReceipt'
VERIFY_URL = 'https://buy.itunes.apple.com/verifyReceipt'
# /**
# * 服务器二次验证代码
# * 21000 App Store不能读取你提供的JSON对象
# * 21002 receipt-data域的数据有问题
# * 21003 receipt无法通过验证
# * 21004 提供的shared secret不匹配你账号中的shared secret
# * 21005 receipt服务器当前不可用
# * 21006 receipt合法,但是订阅已过期。服务器接收到这个状态码时,receipt数据仍然会解码并一起发送
# * 21007 receipt是Sandbox receipt,但却发送至生产系统的验证服务
# * 21008 receipt是生产receipt,但却发送至Sandbox环境的验证服务
# */
def verify_receipt_with_apple(receipt, is_sandbox=False):
jsonStr = json.dumps({"receipt-data": receipt})
headers = {'Content-Type': 'application/json'}
url = VERIFY_URL
if is_sandbox:
url = SAND_BOX_VERIFY_URL
rep = requests.post(url=url, data=jsonStr, headers=headers)
# print(rep.text)
return rep.text
def verify_receipt_with_apple_json(receipt, is_sandbox=False):
resp = verify_receipt_with_apple(receipt, is_sandbox)
try:
json_data = json.loads(resp)
except:
return None
return json_data
if __name__ == "__main__":
receipt = "MIITrQYJKoZIhvcNAQcCoIITnjCCE5oCAQExCzAJBgUrDgMCGg"
js = verify_receipt_with_apple_json(recpt, True)
print(js['receipt'])
print(js['receipt']['in_app'])
print(js['receipt']['in_app'][0])
用回mac之后发现各种神奇的问题,比如cocos运行之后在程序坞中找不到,开的窗口多了之后每次想找到他得翻半天(主要是不会各种神奇的快捷键)。
要解决这个问题也不难,退出cocos,在启动台内找到cocos直接拖到程序坞。然后重新启动cocos应该就能出现了
安装破解版的app或者非appstroe的app经常会遇到这个问题。出现这个情况,通过下面的方法并不能解决:
实际上问题是出在了mac的quarantine flag上,如果要修复这个问题需要用到下面的命令:
sudo xattr -rd com.apple.quarantine /Applications/xxx.app
com.apple.quarantine属性:
Type: com.apple.quarantine
Subtypes: none
Serialisation: none
Data type: UTF-8 string containing Gatekeeper score, the system time of download, the downloading app or agent, and a UUID for the event
Example: <30303833 3b353833 37316533 633b5361 66617269 2e617070 3b334239 32393643 302d4336 46342d34 3942332d 42414331 2d424342 32323946 46453744 36> «0083;58371e3c;Safari.app;3B9296C0-C6F4-49B3-BAC1-BCB229FFE7D6»
macOS: El Capitan, Sierra, High Sierra
System use: very uncommon
App use: all downloaded apps
Document use: common, notably Zip and other archives which have been downloaded
Other usage: none
Purpose: flags requirement to perform full Gatekeeper check on downloaded app (or executable).