Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83153 > unrolled thread
| Started by | Georg Grafendorfer <georg.grafendorfer@gmail.com> |
|---|---|
| First post | 2015-01-03 12:55 +0100 |
| Last post | 2015-01-03 12:55 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
pathlib type error Georg Grafendorfer <georg.grafendorfer@gmail.com> - 2015-01-03 12:55 +0100
| From | Georg Grafendorfer <georg.grafendorfer@gmail.com> |
|---|---|
| Date | 2015-01-03 12:55 +0100 |
| Subject | pathlib type error |
| Message-ID | <mailman.17346.1420286152.18130.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
Hi
I'm using Debian 8 Jessie on an AMD64 machine.
Getting this error:
~$ python3
Python 3.4.2 (default, Oct 8 2014, 10:45:20)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import Path
>>> p = Path("/etc")
>>> q = p / "init.d"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'PosixPath' and 'str'
>>>
This also happens if I compile python3.4.2 from scratch:
.../data/Python-3.4.2$ ./python
Python 3.4.2 (default, Jan 3 2015, 12:42:09)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import Path
>>> p = Path("/etc")
>>> q = p / "init.d"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for /: 'PosixPath' and 'str'
>>>
On the same computer, using rescuecd 4.4.1 (Nov 2014) which ships python
3.4.1 it works as expected.
thanks for help, Georg
Back to top | Article view | comp.lang.python
csiph-web