Segmentation fault from a script
See original GitHub issueThe script I have produces a segmentation fault, any idea why?
import io
import spacy
from spacy.tokens.doc import Doc
def transform( in_file, out_file ):
global nlp
with io.open( out_file, 'w', encoding='utf8') as o_f:
with io.open( in_file, 'rb' ) as i_f:
for byte_string in Doc.read_bytes( i_f ):
doc = Doc( nlp.vocab ).from_bytes( byte_string )
doc.is_parsed = True
o_f.write(transform_doc( doc ))
nlp = spacy.en.English( parser=False, tagger=False, matcher=False, entity=False )
transform( 'sample.txt', 'sample_out.txt' )
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
bash shell script shows segmentation fault - Stack Overflow
Show activity on this post. my shell script prints segmentation fault when it starts. Script gets a program name as a parameter. I...
Read more >Segmentation fault when calling a recursive bash function
There are many reasons for a segmentation fault. The most common low-level cause is that the process tried to access a memory address...
Read more >Identify what's causing segmentation faults (segfaults)
A segmentation fault (aka segfault) is a common condition that causes programs to crash; they are often associated with a file named core...
Read more >Segmentation fault in function call, shell script
If you are experiencing a segmentation fault, the error is not in your script; there is a memory management bug in one of...
Read more >1872980 – Segmentation fault when running script on Blender ...
This script has been ported to blender 2.8, worked well, but currently crashes with segmentation fault. I tested upstream bleder tar package ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, the joys of copy-paste. Thank you for clarifying this.
Still, a message like “Attempted to read_bytes() from not-a-Doc-instance, terminating…” would be helpful. With another sample I just got a memory error.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.