在跑步
$ psql
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
dyld: lazy symbol binding failed: Symbol not found:
_PQsetErrorContextVisibility
Referenced from: /usr/local/bin/psql
Expected in: /usr/local/lib/libpq.5.dylib
dyld: Symbol not found: _PQsetErrorContextVisibility
Referenced from: /usr/local/bin/psql
Expected in: /usr/local/lib/libpq.5.dylib
Abort trap: 6
Run Code Online (Sandbox Code Playgroud)
我尝试了一些事情:
但它都没有奏效.
我的bash_profile看起来像这样
PATH="/usr/local/bin/psql:/usr/local/sbin:/usr/local/bin:/sbin:/bin
:/usr/sbin:/usr/bin:/root/bin:/usr/local/bin/geckodrive??r:$PATH"
export PATH
Run Code Online (Sandbox Code Playgroud)
我在用:
我正在使用 pythonrequests并做一个post
import requests
response = requests.post('https://petdogs.net/search/?input=abcdefgh',
headers=HEADERS,
allow_redirects=False)
print(response.headers)
Run Code Online (Sandbox Code Playgroud)
这些是我可以在浏览器的开发人员工具中看到的标头中的值response,我想获取其值location
content-language: en-gb
content-length: 0
content-type: text/html; charset=utf-8
date: Wed, 07 Jul 2021 17:44:52 GMT
location: /product/id=12345/
server: nginx/1.14.0 (Ubuntu)
vary: Accept-Language, Cookie, Origin
x-content-type-options: nosniff
x-frame-options: DENY
Run Code Online (Sandbox Code Playgroud)
但当我这样做时,print(response.headers)我只看到这个
{'Server': 'nginx/1.14.0 (Ubuntu)', 'Date': 'Wed, 07 Jul 2021 18:23:45 GMT',
'Content-Type': 'text/html', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive',
'X-Frame-Options': 'DENY', 'Vary': 'Accept-Language, Origin',
'Content-Language': 'en', 'X-Content-Type-Options': 'nosniff', 'Content-Encoding': 'gzip'}
Run Code Online (Sandbox Code Playgroud)
并且 location失踪了
我看到几个回答都谈到了
'Access-Control-Expose-Headers': 'Location' …Run Code Online (Sandbox Code Playgroud)