Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error when upgrade to regex==2022.3.15 #24

Closed
3 of 6 tasks
canache opened this issue Mar 16, 2022 · 2 comments
Closed
3 of 6 tasks

Parsing error when upgrade to regex==2022.3.15 #24

canache opened this issue Mar 16, 2022 · 2 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@canache
Copy link

canache commented Mar 16, 2022

Check this or we will delete your issue. (fill in the checkbox with an X like so: [x])

  • I have searched for other issues with the same problem or similar feature requests.

Select one:

  • Bug
  • Feature Request
  • Technical Help
  • Other

Which endpoint do you connect?

client = unicorn_binance_rest_api.BinanceRestApiManager(parameters.api_key, parameters.api_secret,
                                                        exchange="binance.com")

Python Version Requirement

  • I am using Python 3.7 or above

Exact Python Version?

3.8

Pip Version?

Include here the response of 'python3 -m pip --version' or 'pip3 --version'

Dependencies

aiohttp==3.7.4.post0
aniso8601==9.0.1
async-timeout==3.0.1
attrs==21.4.0
autobahn==22.2.2
Automat==20.2.0
backports.zoneinfo==0.2.1
certifi==2021.10.8
cffi==1.15.0
chardet==4.0.0
charset-normalizer==2.0.12
cheroot==8.6.0
click==8.0.4
colorama==0.4.4
constantly==15.1.0
cryptography==36.0.2
dateparser==1.1.0
discord==1.7.3
discord.py==1.7.3
exchange==0.3
Flask==2.0.3
Flask-RESTful==0.3.9
hyperlink==21.0.0
idna==3.3
incremental==21.3.0
itsdangerous==2.1.1
jaraco.functools==3.5.0
Jinja2==3.0.3
MarkupSafe==2.1.1
more-itertools==8.12.0
multidict==6.0.2
numpy==1.22.3
pandas==1.1.3
pathlib==1.0.1
psutil==5.9.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
pycparser==2.21
pyOpenSSL==22.0.0
python-binance==0.7.9
python-dateutil==2.8.2
pytz==2021.3
pytz-deprecation-shim==0.1.0.post0
redis==3.5.3
regex==2022.3.15
requests==2.27.1
service-identity==21.1.0
six==1.16.0
stockstats==0.4.0
Twisted==22.2.0
txaio==22.2.1
typing_extensions==4.1.1
tzdata==2021.5
tzlocal==4.1
ujson==5.1.0
unicorn-binance-rest-api==1.4.1
unicorn-binance-websocket-api==1.40.5
unicorn-fy==0.11.0
urllib3==1.26.8
websocket-client==1.3.1
websockets==10.2
Werkzeug==2.0.3
yarl==1.7.2
zope.interface==5.4.0

Which Versions?

latest

Description Of Your Issue

ile "/home/bot/main.py", line 49, in <module>
tickers, tickers_info = tickers_tools.initialize(symbols1 + symbols2 + symbols3 + symbols4, tickers_info, client)
File "/home/bot/tickers_tools.py", line 18, in initialize
binance_klines = client.get_historical_klines(symbol, Client.KLINE_INTERVAL_5MINUTE, "2 hours ago UTC")
File "/home/venv/lib/python3.8/site-packages/binance/client.py", line 791, in get_historical_klines
start_ts = date_to_milliseconds(start_str)
File "/home/venv/lib/python3.8/site-packages/binance/helpers.py", line 22, in date_to_milliseconds
d = dateparser.parse(date_str)
File "/home/venv/lib/python3.8/site-packages/dateparser/conf.py", line 92, in wrapper
return f(*args, **kwargs)
File "/home/venv/lib/python3.8/site-packages/dateparser/__init__.py", line 61, in parse
data = parser.get_date_data(date_string, date_formats)
File "/home/venv/lib/python3.8/site-packages/dateparser/date.py", line 428, in get_date_data
parsed_date = _DateLocaleParser.parse(
    File "/home/venv/lib/python3.8/site-packages/dateparser/date.py", line 178, in parse
return instance._parse()
File "/home/venv/lib/python3.8/site-packages/dateparser/date.py", line 182, in _parse
date_data = self._parsers[parser_name]()
File "/home/venv/lib/python3.8/site-packages/dateparser/date.py", line 196, in _try_freshness_parser
return freshness_date_parser.get_date_data(self._get_translated_date(), self._settings)
File "/home/venv/lib/python3.8/site-packages/dateparser/date.py", line 234, in _get_translated_date
self._translated_date = self.locale.translate(
    File "/home/venv/lib/python3.8/site-packages/dateparser/languages/locale.py", line 131, in translate
relative_translations = self._get_relative_translations(settings=settings)
File "/home/venv/lib/python3.8/site-packages/dateparser/languages/locale.py", line 158, in _get_relative_translations
self._generate_relative_translations(normalize=True))
File "/home/venv/lib/python3.8/site-packages/dateparser/languages/locale.py", line 172, in _generate_relative_translations
pattern = DIGIT_GROUP_PATTERN.sub(r'?P<n>\d+', pattern)
File "/home/venv/lib/python3.8/site-packages/regex/regex.py", line 700, in _compile_replacement_helper
is_group, items = _compile_replacement(source, pattern, is_unicode)
File "/home/venv/lib/python3.8/site-packages/regex/_regex_core.py", line 1736, in _compile_replacement
raise error("bad escape \\%s" % ch, source.string, source.pos)
regex._regex_core.error: bad escape \d at position 7

Bonus:
The regex version was updated when I upgrade the unicorn-binance-websocket-api to 1.40.5
Fix this issue, downgrading the regex version to 2022.3.2

@canache canache added the bug Something isn't working label Mar 16, 2022
@oliver-zehentleitner
Copy link
Member

Thank you very much, till we fixed the expression i will provide a package that requires regex<=2022.3.2

@oliver-zehentleitner oliver-zehentleitner added this to In progress in Todo Mar 16, 2022
@oliver-zehentleitner oliver-zehentleitner moved this from In progress to Done in Todo Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Todo
Done
Development

No branches or pull requests

2 participants