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

AttributeError: module 'collections' has no attribute 'Mapping' #13

Open
JonStratton opened this issue May 19, 2024 · 0 comments · May be fixed by #14
Open

AttributeError: module 'collections' has no attribute 'Mapping' #13

JonStratton opened this issue May 19, 2024 · 0 comments · May be fixed by #14

Comments

@JonStratton
Copy link

Getting "AttributeError: module 'collections' has no attribute 'Mapping'" error when trying to create a simple Gemini Server with a recent version of Python (Python 3.11). Here is what the test service looks like:

$ cat test.py 
from gemeaux import App, StaticHandler

if name == "main":
	urls = {}
	app = App(urls)
	app.run()

Here is the error when executing:

$ python3.11 ./test.py 
Traceback (most recent call last):
  File "/home/jgstratton/Code/gemeaux/./test.py", line 5, in <module>
	app = App(urls)
		  ^^^^^^^^^
  File "/home/jgstratton/Code/gemeaux/gemeaux/init.py", line 137, in init
	if not isinstance(urls, collections.Mapping):
							^^^^^^^^^^^^^^^^^^^
AttributeError: module 'collections' has no attribute 'Mapping'

Here is a stackoverflow link describing the underlying issue

I have a fix, and I will be submitting a PR fairly soon.

JonStratton pushed a commit to JonStratton/gemeaux that referenced this issue May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant