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.

SNOW-638845: ValueError: unsupported format character with version 1.4.0

See original GitHub issue

Environment:

arrow-cpp                             7.0.0  py310hc7d0c5d_8_cpu  ...     Cached
...
python                               3.10.5  h582c2e5_0_cpython   ...     Cached
...
snowflake-connector-python            2.7.9  py310hbc1ed79_0      ...     Cached
snowflake-sqlalchemy                  1.4.0  pyhd8ed1ab_0         ...     Cached
...
sqlalchemy                           1.4.39  py310h5764c6d_0      ...     Cached

Running some unit tests, excerpt from the logs:

2022-07-28T10:41:44.0418249Z         if self._connection.is_pyformat:
2022-07-28T10:41:44.0418388Z             # pyformat/format paramstyle
2022-07-28T10:41:44.0418503Z             # client side binding
2022-07-28T10:41:44.0418726Z             processed_params = self._connection._process_params_pyformat(params, self)
2022-07-28T10:41:44.0419125Z             # SNOW-513061 collect telemetry for empty sequence usage before we make the breaking change announcement
2022-07-28T10:41:44.0419295Z             if params is not None and len(params) == 0:
2022-07-28T10:41:44.0419604Z                 self._log_telemetry_job_data(
2022-07-28T10:41:44.0419918Z                     TelemetryField.EMPTY_SEQ_INTERPOLATION,
2022-07-28T10:41:44.0420130Z                     TelemetryData.TRUE
2022-07-28T10:41:44.0420454Z                     if self.connection._interpolate_empty_sequences
2022-07-28T10:41:44.0420715Z                     else TelemetryData.FALSE,
2022-07-28T10:41:44.0420905Z                 )
2022-07-28T10:41:44.0421279Z             if logger.getEffectiveLevel() <= logging.DEBUG:
2022-07-28T10:41:44.0421455Z                 logger.debug(
2022-07-28T10:41:44.0421668Z                     f"binding: [***self._format_query_for_log(command)***] "
2022-07-28T10:41:44.0421818Z                     f"with input=[***params***], "
2022-07-28T10:41:44.0421992Z                     f"processed=[***processed_params***]",
2022-07-28T10:41:44.0422086Z                 )
2022-07-28T10:41:44.0422189Z             if (
2022-07-28T10:41:44.0422369Z                 self.connection._interpolate_empty_sequences
2022-07-28T10:41:44.0422520Z                 and processed_params is not None
2022-07-28T10:41:44.0422622Z             ) or (
2022-07-28T10:41:44.0422807Z                 not self.connection._interpolate_empty_sequences
2022-07-28T10:41:44.0422954Z                 and len(processed_params) > 0
2022-07-28T10:41:44.0423054Z             ):
2022-07-28T10:41:44.0423205Z >               query = command % processed_params
2022-07-28T10:41:44.0423664Z E               ValueError: unsupported format character '_' (0x5f) at index 125

Not happening with < 1.4.0.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:14

github_iconTop GitHub Comments

1reaction
sfc-gh-alingcommented, Nov 7, 2022

@jtilly thanks for reaching out and sharing us with the reproducing scripts. I’ve updated our test suites to include yours, ran the fix against your scripts and the fix worked as expected. We’ll do a bug fix release soon.

0reactions
jtillycommented, Nov 25, 2022

1.4.4 fixes the issue for me. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

ValueError: unsupported format character while forming strings
I was using python interpolation and forgot the ending s character: a = dict(foo='bar') print("What comes after foo?
Read more >
ValueError: unsupported format character '<' (0x3c) at index 4
On a fresh Debian testing upgrade, I installed grass-6.4.svn-i686-pc-linux-gnu-11_10_2008.tar.gz. I launch grass, select the spearfish dataset and when I ...
Read more >
snowflakedb - Bountysource
SQLAlchemy 1.4.0 introduced the asyncio extension that add the ability to ... SNOW-638845: ValueError: unsupported format character with version 1.4.0 $ 0.
Read more >
String Formatting with %, Part 2 15/16 - Codecademy
Make sure to use a lowercase "s" with \%s. Python told us about the following error: unsupported format character ',' (0x2c) at index...
Read more >
ValueError: unsupported format character 'j' (0x6a) at index 55 ...
The error was in my template variable syntax... And the letter "j" put me on its trail ! In the configuration,
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