Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > de.comp.lang.python > #5114

Python3 - pathlib - python-gnupg Problem

Newsgroups de.comp.lang.python
Date 2018-02-06 00:23 -0800
Message-ID <98cfc895-06a7-495e-93b5-182f4cc367fd@googlegroups.com> (permalink)
Subject Python3 - pathlib - python-gnupg Problem
From Maurice Kemmann <muckisg@googlemail.com>

Show all headers | View raw


Hallo,

ich nutze pathlib um OS unabhängige Scripte zu schreiben. Im Moment spiele ich ein wenig mit python-gnupg herrum und laufe in folgendes Problem:

<code>
import gnupg
from pathlib import Path 
from pprint import pprint

gpg = gnupg.GPG(gnupghome=Path("/home/mucki/.gnupg/"))
<\code>

Das führt zu folgenden Fehler unter Linux:

>> python3 gpg-test.py 

Traceback (most recent call last):
  File "gpg-test.py", line 5, in <module>
    gpg = gnupg.GPG(gnupghome=Path("/home/mucki/.gnupg/"))
  File "/usr/local/lib/python3.6/site-packages/gnupg.py", line 755, in __init__
    p = self._open_subprocess(["--version"])
  File "/usr/local/lib/python3.6/site-packages/gnupg.py", line 832, in _open_subprocess
    logger.debug("%s: %s", result.pid, debug_print(cmd))
  File "/usr/lib64/python3.6/subprocess.py", line 461, in list2cmdline
    needquote = (" " in arg) or ("\t" in arg) or not arg
TypeError: argument of type 'PosixPath' is not iterable

Unter Windows 10 gibt es eine passende Fehlermeldung mit "type WindowsPath not iterable".

Es scheint ja mit dem subprocess module zusammenzuhängen, aber hier hört mein Wissen leider auf. Kann mir jemand helfen? Liegt der Fehler bei mir? Wenn ja, warum?

Danke,

Maurice

Back to de.comp.lang.python | Previous | NextNext in thread | Find similar


Thread

Python3 - pathlib - python-gnupg Problem Maurice Kemmann <muckisg@googlemail.com> - 2018-02-06 00:23 -0800
  Re: Python3 - pathlib - python-gnupg Problem Maurice Kemmann <muckisg@googlemail.com> - 2018-02-06 04:00 -0800
    Re: [Python-de] Python3 - pathlib - python-gnupg Problem Reimar Bauer <rb.proj@gmail.com> - 2018-02-06 13:08 +0100
    Re: [Python-de] Python3 - pathlib - python-gnupg Problem Maurice Kemmann <muckisg@googlemail.com> - 2018-02-06 20:25 +0100
    Re: [Python-de] Python3 - pathlib - python-gnupg Problem Stefan Schwarzer <sschwarzer@sschwarzer.net> - 2018-02-07 06:36 +0100

csiph-web