question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

inconsistent with bz2.open on files containing vertical tab ^K

See original GitHub issue

Problem description

Be sure your description clearly answers the following questions:

  • What are you trying to achieve? Trying to use smart_open to replace bz2.open
  • What is the expected result? same behavior as bz2.open wrt recognizing line breaks
  • What are you seeing instead? a long line got truncated due to the presence of non-line break symbol ^K

Steps/code to reproduce the problem

In order for us to be able to solve your problem, we have to be able to reproduce it on our end. Without reproducing the problem, it is unlikely that we’ll be able to help you.

Include full tracebacks, logs and datasets if necessary. Please keep the examples minimal (minimal reproducible example).

take for instance the following binary uncompressed text. compress with bz2. The numbers of columns before and after bz2 as recognize with smart_open(…).readline() are different.

\xe5\x93\x81\x0b\xe3\x80\n

Versions

Please provide the output of:

import platform, sys, smart_open
print(platform.platform())
print("Python", sys.version)
print("smart_open", smart_open.__version__)

print(“smart_open”, smart_open.version) Traceback (most recent call last): File “<stdin>”, line 1, in <module> AttributeError: module ‘smart_open’ has no attribute ‘version

Instead

pip show smart_open Name: smart-open Version: 1.7.1

Checklist

Before you create the issue, please make sure you have:

  • Described the problem clearly
  • Provided a minimal reproducible example, including any required data
  • Provided the version numbers of the relevant software

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
mpenkovcommented, Nov 30, 2019
0reactions
piskvorkycommented, Nov 30, 2019

Please post a minimal reproducible example, including any required data.

Read more comments on GitHub >

github_iconTop Results From Across the Web

bz2 — Support for bzip2 compression
The open() function and BZ2File class for reading and writing compressed files. The BZ2Compressor and BZ2Decompressor classes for incremental (de)compression.
Read more >
Manual - Bowtie 2
Bowtie 2's default behavior is to consider overlapping and containing as being consistent with concordant alignment. By default, dovetailing is considered  ...
Read more >
perlrebackslash - man pages section 1: User Commands
Example $str =~ /\cK/; # Matches if $str contains a vertical tab (control-K). Named or numbered characters and character sequences Unicode characters have...
Read more >
STAR manual 2.7.0a
The tabs are not allowed in chromosomes' names, and spaces are not ... --readFilesIn name(s) (with path) of the files containing the ...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
systemPrefs with at least two files" status:RESOLVED resolution:OBSOLETE ... when side tabs are on, clicking on a new tab and clicking on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found