-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error: <class 'xml.parsers.expat.ExpatError'>, unclosed token: line 130, column 0: file: /usr/lib/python3.10/xmlrpc/client.py line: 460 #1623
Comments
After try a demo, I found that supervisor did support non-ascii characters in conf file. Example
#!/usr/bin/env python
from pathlib import Path
import fastapi_cdn_host
import uvicorn
from fastapi import FastAPI
BASE_DIR = Path(__file__).resolve().parent
app = FastAPI(title=BASE_DIR.name)
fastapi_cdn_host.patch_docs(app)
@app.get('/')
async def root():
return '车如流水马如龙,美人如玉剑如虹。'
def main() -> None:
uvicorn.run(f'{Path(__file__).stem}:app', reload=True)
if __name__ == '__main__':
main()
[tool.poetry]
name = "dongfang"
version = "0.1.0"
description = ""
authors = []
readme = "README.md"
package-mode = false
[tool.poetry.dependencies]
python = "^3.11"
fastapi = "^0.112.2"
uvicorn = "^0.30.6"
fastapi-cdn-host = "^0.7.5"
fastapi-cli = {version = "^0.0.5", platform = "linux"}
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
pip install pipx --user
which pipx || export PATH=$PATH:$HOME/.local/bin
pipx ensurepath
pipx install poetry
wget https://mirror.ghproxy.com/https://raw.githubusercontent.com/waketzheng/carstino/main/pip_conf.py
python pip_conf.py --poetry # 给poetry换源
mkdir /root/部署
cd /root/部署
poetry new dongfang
cd dongfang
poetry add fastapi uvicorn fastapi-cdn-host fastapi-cli
[[ -f man.py ]] || echo -e "from fastapi import FastAPI\napp=FastAPI()\[email protected]('/')\nasync def root():\n return 'homepage'" > main.py
poetry run fastapi dev main.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Now all the sub service in the simple: group are STOPPED
Then run the same commond. get the same error message.
Now all the sub service in the simple: group are RUNNING
So what is the reason.
I can restart my sub service one by one.
By the way my simple.conf contains a lot of chinese characters. I think this is the reason. But I have to use chinese characters as my project is chinese and my project path is chinese an my log path is in chinese.
So how to support NON-ASCII code in conf file? If you don't support use chinese characters in the conf file, you can also tell it to me. As I have read the doc but I can not find it says not support chinese characters.
please help me.
The text was updated successfully, but these errors were encountered: