iqsharp icon indicating copy to clipboard operation
iqsharp copied to clipboard

Mock client does not return value

Open BastianZim opened this issue 2 years ago • 4 comments

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: https://github.com/conda-forge/staged-recipes/pull/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

BastianZim avatar Apr 04 '22 10:04 BastianZim

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

cgranade avatar Apr 04 '22 14:04 cgranade

@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 avatar May 04 '22 16:05 BastianZim

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

Ref https://github.com/conda-forge/staged-recipes/pull/19270

BastianZim avatar Jun 11 '22 11:06 BastianZim

Hi @cgranade, are there any news on this?

BastianZim avatar Nov 28 '22 22:11 BastianZim