Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

twine 실행 시 ConfigParser.ParsingError: File contains parsing errors: /root/.pypirc

twine 실행 시 다음과 같은 오류가 발생합니다.

$ twine upload --repository pypi /app/mytest-1.0.0.0-py2-none-any.whl
Traceback (most recent call last):
  File "/usr/local/bin/twine", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/twine/__main__.py", line 28, in main
    return dispatch(sys.argv[1:])
  File "/usr/local/lib/python2.7/site-packages/twine/cli.py", line 77, in dispatch
    return main(args.args)
  File "/usr/local/lib/python2.7/site-packages/twine/commands/upload.py", line 134, in main
    upload_settings = settings.Settings.from_argparse(args)
  File "/usr/local/lib/python2.7/site-packages/twine/settings.py", line 229, in from_argparse
    return cls(**settings)
  File "/usr/local/lib/python2.7/site-packages/twine/utils.py", line 331, in wrapper
    return function(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/twine/settings.py", line 110, in __init__
    repository_name=repository_name, repository_url=repository_url,
  File "/usr/local/lib/python2.7/site-packages/twine/settings.py", line 244, in _handle_repository_options
    repository_url,
  File "/usr/local/lib/python2.7/site-packages/twine/utils.py", line 121, in get_repository_from_config
    return get_config(config_file)[repository]
  File "/usr/local/lib/python2.7/site-packages/twine/utils.py", line 74, in get_config
    parser.read(path)
  File "/usr/local/lib/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/usr/local/lib/python2.7/ConfigParser.py", line 546, in _read
    raise e
ConfigParser.ParsingError: File contains parsing errors: /root/.pypirc
        [line  2]: '  username = __token__\n'
        [line  3]: '  password = pypi-...[생략]...C4Wko'

재미있는 건, 동일한 "/root/.pypirc" 파일로 python 3에서는 잘 동작한다는 점입니다. 문제의 원인은, 들여 쓰기에 있었습니다. 즉, 다음과 같은 파일의 내용이,

[pypi]
  username = __token__
  password = pypi-...[생략]...C4Wko

이렇게 초기 들여쓰기를 제거해야만 정상적으로 twine 업로드가 진행됩니다.

[pypi]
username = __token__
password = pypi-...[생략]...C4Wko




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 4/26/2022]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
14027정성태10/15/2025806닷넷: 2371. C# - CRC64 (System.IO.Hashing의 약식 버전)파일 다운로드1
14026정성태10/15/2025848닷넷: 2370. 닷넷 지원 정보의 "package-provided" 의미
14025정성태10/14/2025901Linux: 126. eBPF (bpf2go) - tcp_sendmsg 예제
14024정성태10/14/2025953오류 유형: 984. Whisper.net - System.Exception: 'Cannot dispose while processing, please use DisposeAsync instead.'
14023정성태10/12/20251531닷넷: 2369. C# / Whisper 모델 - 동영상의 음성을 인식해 자동으로 SRT 자막 파일을 생성 [1]파일 다운로드1
14022정성태10/10/20252289닷넷: 2368. C# / NAudio - (AI 학습을 위해) 무음 구간을 반영한 오디오 파일 분할파일 다운로드1
14021정성태10/6/20252738닷넷: 2367. C# - Youtube 동영상 다운로드 (YoutubeExplode 패키지) [1]파일 다운로드1
14020정성태10/2/20252356Linux: 125. eBPF - __attribute__((preserve_access_index)) 활용 사례
14019정성태10/1/20252486Linux: 124. eBPF - __sk_buff / sk_buff 구조체
14018정성태9/30/20251830닷넷: 2366. C# - UIAutomationClient를 이용해 시스템 트레이의 아이콘을 열거하는 방법파일 다운로드1
14017정성태9/29/20252275Linux: 123. eBPF (bpf2go) - BPF_PROG_TYPE_SOCKET_FILTER 예제 - SEC("socket")
14016정성태9/28/20252573Linux: 122. eBPF - __attribute__((preserve_access_index)) 사용법
14015정성태9/22/20252003닷넷: 2365. C# - FFMpegCore를 이용한 MP4 동영상으로부터 MP3 음원 추출 예제파일 다운로드1
14014정성태9/17/20251986닷넷: 2364. C# - stun.l.google.com을 사용해 공용 IP 주소와 포트를 알아내는 방법파일 다운로드1
14013정성태9/14/20252675닷넷: 2363. C# - Whisper.NET Library를 이용해 음성을 텍스트로 변환 및 번역하는 예제파일 다운로드1
14012정성태9/9/20252891닷넷: 2362. C# - Windows.Media.Ocr: 윈도우 운영체제에 포함된 OCR(Optical Character Recognition)파일 다운로드1
14011정성태9/7/20253515닷넷: 2361. C# - Linux 환경의 readlink 호출
14010정성태9/1/20253327오류 유형: 983. apt update 시 "The repository 'http://deb.debian.org/debian buster Release' does not have a Release file." 오류
14009정성태8/28/20253792닷넷: 2360. C# 14 - (11) Expression Tree에 선택적 인수와 명명된 인수 허용파일 다운로드1
14008정성태8/26/20254376닷넷: 2359. C# 14 - (10) 복합 대입 연산자의 오버로드 지원파일 다운로드1
14007정성태8/25/20254782닷넷: 2358. C# - 현재 빌드에 적용 중인 컴파일러 버전 확인 방법 (#error version)
14006정성태8/23/20255065Linux: 121. Linux - snap 패키지 관리자로 설치한 소프트웨어의 디렉터리 접근 제한
14005정성태8/21/20254049오류 유형: 982. sudo: unable to load /usr/libexec/sudo/sudoers.so: libssl.so.3: cannot open shared object file: No such file or directory
14004정성태8/21/20254638오류 유형: 981. dotnet 실행 시 No usable version of the libssl was found
14003정성태8/21/20254902닷넷: 2357. C# 14 - (9) 새로운 지시자 추가 (Ignored directives)
[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...