mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-24 00:04:15 +03:00
issue5230 attempted fix of pytest segfault for python3.5
This commit is contained in:
parent
d60e2d3ebf
commit
6700006830
|
@ -491,10 +491,10 @@ cdef class Writer:
|
|||
|
||||
cdef class Reader:
|
||||
def __init__(self, object loc):
|
||||
assert path.exists(loc)
|
||||
assert not path.isdir(loc)
|
||||
if isinstance(loc, Path):
|
||||
loc = bytes(loc)
|
||||
assert path.exists(loc)
|
||||
assert not path.isdir(loc)
|
||||
cdef bytes bytes_loc = loc.encode('utf8') if type(loc) == unicode else loc
|
||||
self._fp = fopen(<char*>bytes_loc, 'rb')
|
||||
if not self._fp:
|
||||
|
|
Loading…
Reference in New Issue
Block a user