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.

Unable to create an4 dataset using Python 3.6

See original GitHub issue

Dear friends,

In order to run an4.py from inside the data dir (as described by README.md) I fix the data.utils in an4.py with the following changes:

#from data.utils import create_manifest
from utils import create_manifest

If I am using Python 3.6:

Now, I am getting following error:

Traceback (most recent call last): File “an4.py”, line 84, in <module> main() File “an4.py”, line 72, in main _format_data(root_path, ‘train’, name, ‘an4_clstk’) File “an4.py”, line 31, in _format_data _format_files(file_ids, new_transcript_path, new_wav_path, transcripts, wav_path) File “an4.py”, line 57, in _format_files file.write(extracted_transcript) TypeError: a bytes-like object is required, not ‘str’

David

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rampage644commented, Mar 20, 2017

@dlmacedo replace that line with file.write(bytes(extracted_transcript, 'utf-8')). It’s python3 issue, not python3.6.

0reactions
SeanNarencommented, Mar 23, 2017

Added to that line (should’ve tested it, my bad). Thanks @dlmacedo ! (repull and it should be fixed)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to create dataset (error during user callback ... - GitHub
I get test_fil2h5py to work, by using this h5py==2.5.0 instead. Plus fixing this error by directly editing /opt/pyve/eepy/local/lib/python2.7/ ...
Read more >
Datasets — NVIDIA NeMo
AN4 Dataset # ... This is a small dataset recorded and distributed by Carnegie Mellon University. It consists of recordings of people spelling...
Read more >
No conversion path for dtype: dtype('<U38') in Python 3.6 ...
I'm using h5py to create a dataset, which works perfectly in my laptop. But when I try it in a server, it says...
Read more >
"Could not link test program to Python" error when running ...
I am trying to configure sphinxbase by running the configure script using the following command. PYTHON=python3.6 ./configure LDFLAGS="-L/lib/ ...
Read more >
Can not import Dataiku dataset in Python recipe which is not ...
Solved: Hi there, I am running Dataiku 5.1.0 and in the release notes of 5.1.0 it says: It is now possible to use...
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