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

[BUG] GraphQL Exception after pip install and running quickstart example #5397

Open
2 tasks done
sourcesync opened this issue Jan 16, 2025 · 3 comments
Open
2 tasks done
Labels
bug Bug fixes

Comments

@sourcesync
Copy link

sourcesync commented Jan 16, 2025

Describe the problem

I ran the pip install quickstart example and got this GraphQL exception:

GraphQL API Error
Cannot return null for non-nullable field Query.dataset.

Here is the exception stack:

File "/Users/cuongwilliams/anaconda3/envs/voxel51/lib/python3.10/site-packages/graphql/execution/execute.py", line 1038, in await_result
    return build_response(await result, errors)  # type: ignore
  File "/Users/cuongwilliams/anaconda3/envs/voxel51/lib/python3.10/site-packages/graphql/execution/execute.py", line 453, in get_results
    await gather(*(results[field] for field in awaitable_fields)),
  File "/Users/cuongwilliams/anaconda3/envs/voxel51/lib/python3.10/site-packages/graphql/execution/execute.py", line 537, in await_result
    self.handle_field_error(error, return_type)
  File "/Users/cuongwilliams/anaconda3/envs/voxel51/lib/python3.10/site-packages/graphql/execution/execute.py", line 571, in handle_field_error
    raise error
  File "/Users/cuongwilliams/anaconda3/envs/voxel51/lib/python3.10/site-packages/graphql/execution/execute.py", line 529, in await_result
    completed = self.complete_value(
  File "/Users/cuongwilliams/anaconda3/envs/voxel51/lib/python3.10/site-packages/graphql/execution/execute.py", line 622, in complete_value
    raise TypeError(

Code to reproduce issue

I created a python=3.10 using conda and activated it.

Then I ran the following code:

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")
session = fo.launch_app(dataset)

System information

  • MacOSX Sequoia 15.2 on M2 MacBook
  • Conda 24.1
  • Python =3.10
  • fiftyone ==1.2.0
  • fiftyone-brain == 0.18.2
  • fiftyone_db == 1.1.7

Willingness to contribute

  • Yes. I can contribute a fix for this bug independently
  • Yes. I would be willing to contribute a fix for this bug with guidance
    from the FiftyOne community
@sourcesync sourcesync added the bug Bug fixes label Jan 16, 2025
@benjaminpkane
Copy link
Contributor

Hi @sourcesync. Thanks for the report. What version of strawberry-graphql do you have? The below should work.

pip list | grep "strawberry"

or

conda list | grep "strawberry"

It is surprising to the see this issue. I am unable to reproduce. Clearing your browser cache may help, as well

@sourcesync
Copy link
Author

Yep. Let me know if you need anything else.

% python -m pip list | grep -e voxel -e strawberry -e fifty
fiftyone                    1.2.0
fiftyone-brain              0.18.2
fiftyone_db                 1.1.7
strawberry-graphql          0.258.0
voxel51-eta                 0.13.1

@benjaminpkane
Copy link
Contributor

Are you running the code in a script? If so, you will need to use session.wait() to keep the process alive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug fixes
Projects
None yet
Development

No branches or pull requests

2 participants