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.

Subscriptions "Complete Example" breaks under 0.10.0

See original GitHub issue

I’m working with Subscriptions in ariadne using the exact code from the Complete Example in the docs. When I load the playground and issue the query subscription { counter }, instead of a working counter, an “unsupported operand” error is raised:

Traceback (most recent call last):",
  File \"/Users/...REDACTED.../virtualenvs/graphql-Pfr5HTvn/lib/python3.7/site-packages/graphql/execution/execute.py\", line 625, in resolve_field_value_or_error",
    result = resolve_fn(source, info, **args)",
  File \"/Users/...REDACTED.../app/__init__.py\", line 26, in counter_resolver",
    return count + 1",
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'"

What’s wild is that the example in the docs works with ariadne 0.8.0 and 0.9.0, but not 0.10.0. I’m not familiar enough with the internals, though, to spot the issue in the 0.9.0…0.10.0 diff.

(For completeness, I’m using Python 3.7.6, ariadne 0.10.0, under uvicorn 0.11.2 and gunicorn 20.0.4.)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
shaozicommented, Sep 30, 2020

my bad. I am using uvicorn, turns out I also need to pip install websockets for the server to support web sockets

2reactions
rafalpcommented, Mar 21, 2020

We’ve just merged the fix for this. I’m expecting we’ll release Ariadne 0.11 with it in few days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure PowerShell release notes - Microsoft Learn
Sets the default context for Azure PowerShell when logging in without specifying a subscription. 'DisplayBreakingChangeWarning': Controls if ...
Read more >
Structured Streaming + Kafka Integration ... - Apache Spark
Sets the topic that all rows will be written to in Kafka. This option overrides any topic column that may exist in the...
Read more >
What's New in Apache Kafka 3.0.0 - Confluent
Apache Kafka 3.0 introduces a variety of new features, breaking API changes, and improvements to KRaft—Apache Kafka's built-in consensus ...
Read more >
How to insert a page break in HTML so wkhtmltopdf parses it?
Specify a CSS rule specific to the print media type. There are a number of properties that can be used for paging. I...
Read more >
learnr 0.10.0 - RStudio
Rbuildignore for an example. Deploying dependencies not found. If your learnr tutorial contains broken code within exercises for users to fix, ...
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