Comments (3)
I have downloaded via pip today, and had the same issue. Made your suggested change:
def get_vid_title(info_json_path):
"""
Retrieves video title from the info json file.
"""
with open(info_json_path, 'r', encoding='utf-8', errors='ignore') as f:
return json.load(f)['title']
and after that it worked.
from yt-fts.
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81
seems to be related to a Windows-1252 encoding error.
The get_vid_title()
function could be wrapped in a try/except but we'd still run into problems with not returning a name from the function.
gpt & stack overflow recommend setting a default encoding of utf-8
with open(info_file, 'r', encoding='utf-8', errors='ignore') as f:
return json.load(f)['title']
Would you mind providing a channel url to reproduce this on?
The yt-fts
&yt-dlp
version numbers would be helpful as well.
Thanks.
from yt-fts.
Fixed in v0.1.44. Bug was introduced on 896f8fd by writing json to file system which will be encoded differently on Windows. Should be solved/prevented by specifying the utf-8
encoding when using json.load
, I don't have a Windows environment to test this in so feel free to make another issue if it persists.
from yt-fts.
Related Issues (20)
- Add stop time to Subtitles Column HOT 1
- Add documentation for 0.1.34 release HOT 1
- Show search summary at the bottom of vector search HOT 1
- Add limit option to search command HOT 1
- Add line breaks to vector search results HOT 1
- Add dedicated export command HOT 1
- Add vtt option to export command HOT 1
- Input correct start time and stop time HOT 1
- Fix `sqlite3.OperationalError: database is locked` on delete HOT 1
- Enable time window control on queries.
- Consider using --write-info-json to reduce network requests
- Deleting a channel requires OpenAI credentials
- Deleting a channel from the database results in an error relating to OpenAI HOT 1
- fail to exec 'yt-fts search "existing in large metropolaten center" --export' HOT 2
- disable chromadb opentelemetry HOT 1
- Disable character limit for vector search HOT 1
- Make the terminal colors less ugly HOT 1
- Allow for "profiles" and manual configuration of database location
- Add video date HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yt-fts.