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

No Json output. #284

Open
crimson206 opened this issue Feb 24, 2024 · 5 comments
Open

No Json output. #284

crimson206 opened this issue Feb 24, 2024 · 5 comments

Comments

@crimson206
Copy link

IDE : VSCode
I checked the output of events generated.
However, the dumps function didn't generate the json file.

What is more stable?

  1. Clone Repository
  2. Intentionally write the code in unittest or pytest
@apotterri
Copy link
Collaborator

Hi @crimson206, thanks for trying AppMap!

Can you provide some more details about your project, please? How did you start your app? What operation did you perform with it that failed to generate an AppMap?

@crimson206
Copy link
Author

You can find the same exercise here
The dump function didn't work properly.

image

@apotterri
Copy link
Collaborator

Ah, ok. Can you share the source of the app, please? That will make it much easier to investigate the behavior you're seeing.

Thanks!

@crimson206
Copy link
Author

@apotterri
Sure. You can visit their github

@apotterri
Copy link
Collaborator

apotterri commented Feb 25, 2024

Sorry, I still don't really understand how you're trying to use the agent.

However, I was able to generate an AppMap from code based on the Quick Start: https://gist.github.com/apotterri/7db7253e76c6f05d68e4b473070a2f2b .

ajp@Alans-MacBook-Pro haystack % pip install -q -r requirements.txt                              
 20240225 053306
ajp@Alans-MacBook-Pro haystack % OPENAI_API_KEY="$MY_API_KEY" python main.py
Ranking by BM25...: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 48395.82 docs/s]
['Jean lives in Paris.']
[2024-02-25 05:33:34,636] WARNING _appmap.metadata: Failed running 'git rev-parse HEAD', fatal: not a git repository (or any of the parent directories): .git

{"version": "1.9", "metadata": {"language": {"name": "python", "engine": "CPython", "version": "3.10.13"}, "client": {"name": "appmap", "url": "https://github.com/applandinc/appmap-python"}}, "events": [{"static": true, "parameters": [], "id": 1, "event": "call", "thread_id": 1, "defined_class": "rag", "method_id": "run", "path": "rag.py", "lineno": 15}, {"return_value": {"object_id": 4450414656, "value": "None", "class": "builtins.NoneType"}, "parent_id": 1, "elapsed": 0.4633517265319824, "id": 2, "event": "return", "thread_id": 1}], "classMap": [{"name": "rag", "type": "class", "children": [{"name": "run", "type": "function", "location": "rag.py:15", "static": true}]}]}%                                       
 20240225 053335
ajp@Alans-MacBook-Pro haystack % 

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

No branches or pull requests

2 participants