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.

TypeError: str argument expected with fresh install on Python 3.10.1

See original GitHub issue

On Python 3.10.1, a fresh pip install us yields this TypeError:

Python 3.10.1 (main, Dec 22 2021, 05:19:12) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import us
>>> us.states.lookup('maryland')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/max/.pyenv/versions/3.10.1/lib/python3.10/site-packages/us/states.py", line 86, in lookup
    val = jellyfish.metaphone(val)
TypeError: str argument expected

This is the output of pip freeze:

$ pip freeze
jellyfish==0.6.1
us==2.0.2

Is this a known issue?

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
InnovativeInventorcommented, Jun 5, 2022

Huh, so I manually uninstalled jellyfish (since 0.6.1 looks old) and force-installed a more recent issue, which seemed to fix the issue. However, it looks like jellyfish is currently pinned to 0.6.1 for the latest release on PyPI because pip threw me this warning:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
us 2.0.2 requires jellyfish==0.6.1, but you have jellyfish 0.9.0 which is incompatible.

Perhaps it is worth bumping jellyfish to a more recent version?

2reactions
InnovativeInventorcommented, Jul 19, 2022

@jcarbaugh is this project actively maintained? I’d be willing to help maintain this package, if that is welcome.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's New In Python 3.10 — Python 3.11.1 documentation
This article explains the new features in Python 3.10, compared to 3.9. ... In a similar way, errors involving unclosed string literals (single...
Read more >
Built-in Exceptions — Python 3.11.1 documentation
A TypeError is raised if note is not a string. New in version 3.11. A list of the notes of this exception, which...
Read more >
Changelog — Python 3.11.1 documentation
gh-98783: Fix multiple crashes in debug mode when str subclasses are used ... This resulted in a TypeError upon the new class being...
Read more >
Parsing arguments and building values — Python 3.11.1 ...
A format string consists of zero or more “format units. ... You don't have to provide raw storage for the returned unicode or...
Read more >
Argparse Tutorial — Python 3.11.1 documentation
You will also notice that its name matches the string argument given to the ... TypeError: unsupported operand type(s) for ** or pow():...
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