Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Mock client does not return value #640

Open
BastianZim opened this issue Apr 4, 2022 · 4 comments
Open

Mock client does not return value #640

BastianZim opened this issue Apr 4, 2022 · 4 comments
Assignees
Labels
Area-Python Issue relates to the Python client for the IQ# kernel. Kind-Bug Something isn't working tracking This label will trigger gh-sync to create or update a mirror internal ADO issue.

Comments

@BastianZim
Copy link

BastianZim commented Apr 4, 2022

Describe the bug
A clear and concise description of what the bug is.

Hi, this is in the context of me adding qsharp-chemistry to conda-forge: conda-forge/staged-recipes#18563

For building, I use QSHARP_PY_CLIENT=mock as the server is currently not available on conda-forge.

When importing qsharp.chemistry the import fails with

import: 'qsharp.chemistry'
Traceback (most recent call last):
  File "/home/conda/staged-recipes/build_artifacts/qsharp-chemistry_1649065353239/test_tmp/run_test.py", line 2, in <module>
    import qsharp.chemistry
  File "/home/conda/staged-recipes/build_artifacts/qsharp-chemistry_1649065353239/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.9/site-packages/qsharp/chemistry/__init__.py", line 40, in <module>
    qsharp.packages.add("microsoft.quantum.chemistry.jupyter")
  File "/home/conda/staged-recipes/build_artifacts/qsharp-chemistry_1649065353239/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/python3.9/site-packages/qsharp/packages.py", line 48, in add
    logger.info("Loading complete: " + ';'.join(str(e) for e in pkgs))
TypeError: 'NoneType' object is not iterable

I believe this is because the mock server in qsharp-core does not correctly return the microsoft.quantum.chemistry.jupyter package.

To Reproduce
Steps to reproduce the behavior:

  1. Build package using QSHARP_PY_CLIENT=mock
  2. Import package

Expected behavior
A clear and concise description of what you expected to happen.

Import should succeed

Screenshots
If applicable, add screenshots to help explain your problem.

System information

  • Azure Pipelines

Additional context
Add any other context about the problem here.

Logs: https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=485820&view=logs&j=6f142865-96c3-535c-b7ea-873d86b887bd&t=22b0682d-ab9e-55d7-9c79-49f3c3ba4823&l=1228

Core package: https://github.com/conda-forge/qsharp-core-feedstock/blob/main/recipe/meta.yaml

@cgranade cgranade added the tracking This label will trigger gh-sync to create or update a mirror internal ADO issue. label Apr 4, 2022
@cgranade
Copy link
Contributor

cgranade commented Apr 4, 2022

Thanks for the report, let me take a look and see if I can get a fix together!

@cgranade cgranade self-assigned this Apr 4, 2022
@BastianZim
Copy link
Author

@cgranade Do you already have an idea what could cause this? I'm just sorta blocked on all of the other iq packages with this. :)

@BastianZim
Copy link
Author

Hi @cgranade just wanted to ask if there are any updates here because it is still happening.

Ref conda-forge/staged-recipes#19270

@cgranade cgranade added Kind-Bug Something isn't working Area-Python Issue relates to the Python client for the IQ# kernel. labels Sep 16, 2022
@BastianZim
Copy link
Author

Hi @cgranade, are there any news on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area-Python Issue relates to the Python client for the IQ# kernel. Kind-Bug Something isn't working tracking This label will trigger gh-sync to create or update a mirror internal ADO issue.
Projects
None yet
Development

No branches or pull requests

2 participants