Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #83153
| Date | 2015-01-03 12:55 +0100 |
|---|---|
| Subject | pathlib type error |
| From | Georg Grafendorfer <georg.grafendorfer@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.17346.1420286152.18130.python-list@python.org> (permalink) |
[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 comp.lang.python | Previous | Next | Find similar | Unroll thread
pathlib type error Georg Grafendorfer <georg.grafendorfer@gmail.com> - 2015-01-03 12:55 +0100
csiph-web