8000 UnicodeEncodeError on Windows with non-ASCII locale during load_markets · Issue #26282 · ccxt/ccxt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
UnicodeEncodeError on Windows with non-ASCII locale during load_markets #26282
Open
@iceti24

Description

@iceti24

Operating System

No response

Programming Languages

No response

CCXT Version

Version: 4.4.90

Description

Hello,

I am experiencing a persistent UnicodeEncodeError on Windows when trying to use ccxt with the Binance Futures API. The error seems related to my system's non-ASCII locale (Croatian).

The Error:
UnicodeEncodeError: 'latin-1' codec can't encode character '\u0160' in position 2: ordinal not in range(256)

This error happens every time any function implicitly or explicitly calls load_markets().

Minimal Reproducible Code:

import ccxt

print('Initializing CCXT for Binance Futures...')

exchange = ccxt.binance({
    'apiKey': 'YOUR_API_KEY', # Not relevant, fails even with dummy keys
    'secret': 'YOUR_SECRET_KEY',
    'options': {
        'defaultType': 'future',
    }
})

try:
    print('Attempting to fetch OHLCV...')
    exchange.fetch_ohlcv('BTC/USDT', '1m', limit=1)
    print('Success!')
except Exception as e:
    print(f'Error: {e}')
    # Also attach the full traceback here

### Code

  

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0