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.

Pyquil parse errors

See original GitHub issue

Using Mac Os - Python 3.6, homebrew install, pip and my_env. Ran pyquil-config-setup and pasted in API key Issue now with running python3 run_quil.py hello_world.quil

Would love to see this working.

(my_env) DavidsMcbookPro:examples davidbryant$ python3 run_quil.py hello_world.quil
Running Quil Program from:  hello_world.quil
---------------------------
Output: 
Traceback (most recent call last):
  File "run_quil.py", line 36, in <module>
    parse()
  File "run_quil.py", line 23, in parse
    main(args.filepath, args.classical_register_num)
  File "run_quil.py", line 33, in main
    print(qvm.run(program, list(range(classical_register_num))))
  File "/Users/davidbryant/environments/my_env/lib/python3.6/site-packages/pyquil/api/qvm.py", line 132, in run
    response = post_json(self.session, self.sync_endpoint + "/qvm", payload)
  File "/Users/davidbryant/environments/my_env/lib/python3.6/site-packages/pyquil/api/_base_connection.py", line 88, in post_json
    raise parse_error(res)
  File "/Users/davidbryant/environments/my_env/lib/python3.6/site-packages/pyquil/api/_base_connection.py", line 105, in parse_error
    raise UnknownApiError(str(body))
pyquil.api.errors.UnknownApiError: {'message': 'Forbidden'}

The server has failed to return a proper response. Please describe the problem
and copy the above message into a GitHub issue at:
    https://github.com/rigetticomputing/pyquil/issues
(my_env) DavidsMcbookPro:examples davidbryant$ 

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
mpharrigancommented, Mar 21, 2018

In any event, it should provide a better error message

0reactions
cbosborncommented, Mar 22, 2018

@davidccbryant Ok great. If you feel this issue is resolved, please mark it as closed. I will check to see if we have issues for an improved error message if possible, and the missing url during setup.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Source Code Documentation — pyQuil 2.0.0 documentation
Run a quil program in such a way that the readout error is made collectively ... The JSON payload that is parsed is...
Read more >
Changelog — pyQuil 3.3.2 documentation - Rigetti Computing
Parsing is now performed using Lark rather than ANTLR, often allowing a 10x improvement in parsing large and complex programs (@notmgsk, #1278). Gates...
Read more >
Source code for pyquil.api._compiler - Rigetti Computing
_main import AbstractDevice, Device from pyquil.parser import ... TODO Improve this error message with a reference to # the pyquil config docs?
Read more >
The Quil Compiler — pyQuil 3.3.2 documentation
The following snippet demonstrates this hinting syntax in a context typical of VQE-type algorithms: after a first stage of performing some state preparation ......
Read more >
Program — pyQuil 2.7.0 documentation
Parse a raw Quil program and return a PyQuil program. Parameters: quil (str) – a single or multiline Quil program. Returns: PyQuil Program...
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