Added diagnostics reports to debug any issues

This commit is contained in:
Edward Donner
2024-11-19 18:17:09 -05:00
parent 51202a3d28
commit dab7973a80
10 changed files with 996 additions and 10 deletions

View File

@@ -11,7 +11,7 @@
"\n",
"Setting up a Data Science environment can be challenging because there's a lot going on under the hood. But we will get there.\n",
"\n",
"And please remember - I'm standing by to help out. Message me or email ed@edwarddonner.com and I'll get on the case.\n"
"And please remember - I'm standing by to help out. Message me or email ed@edwarddonner.com and I'll get on the case. The very last cell in this notebook has some diagnostics that will help me figure out what's happening.\n"
]
},
{
@@ -34,7 +34,7 @@
"4. Kernel menu >> Restart Kernel and Clear Outputs of All Cells\n",
"5. Come back to this notebook and try the cell below again.\n",
"\n",
"If **that** doesn't work, then please contact me! I'll respond quickly, and we'll figure it out. If you used Anaconda, it might be that for some reason your environment is corrupted, in which case the simplest fix is to use the virtualenv approach instead (Part 2B in the setup guides)."
"If **that** doesn't work, then please contact me! I'll respond quickly, and we'll figure it out. Please run the diagnostics (last cell in this notebook) so I can debug. If you used Anaconda, it might be that for some reason your environment is corrupted, in which case the simplest fix is to use the virtualenv approach instead (Part 2B in the setup guides)."
]
},
{
@@ -48,6 +48,7 @@
"# Import errors might indicate that you started jupyter lab without your environment activated? See SETUP part 5.\n",
"# Or you might need to restart your Kernel and Jupyter Lab.\n",
"# Or it's possible that something is wrong with Anaconda, in which case we may have to use virtualenv instead.\n",
"# If you're unsure, please run the diagnostics (last cell in this notebook) and then email me at ed@edwarddonner.com\n",
"\n",
"from openai import OpenAI"
]
@@ -224,6 +225,8 @@
"outputs": [],
"source": [
"from openai import OpenAI\n",
"from dotenv import load_dotenv\n",
"load_dotenv()\n",
"\n",
"# EITHER:\n",
"my_api_key = os.getenv(\"OPENAI_API_KEY\")\n",
@@ -265,18 +268,39 @@
"\n",
"(1) Try pasting your error into ChatGPT or Claude! It's amazing how often they can figure things out\n",
"\n",
"(2) Contact me! ed@edwarddonner.com\n",
"(2) Contact me! Please run the diagnostics in the cell below, then email me your problems to ed@edwarddonner.com\n",
"\n",
"Thanks so much, and I'm sorry this is giving you bother!"
]
},
{
"cell_type": "markdown",
"id": "dc83f944-6ce0-4b5c-817f-952676e284ec",
"metadata": {},
"source": [
"# Gathering Essential Diagnostic information\n",
"\n",
"## Please run this next cell to gather some important data\n",
"\n",
"Please run the next cell; it should take a minute or so to run (mostly the network test).\n",
"Rhen email me the output of the last cell to ed@edwarddonner.com. \n",
"Alternatively: this will create a file called report.txt - just attach the file to your email."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "32dea02e-c216-4aed-9f84-934c981d0573",
"id": "248204f0-7bad-482a-b715-fb06a3553916",
"metadata": {},
"outputs": [],
"source": []
"source": [
"# Run my diagnostics report to collect key information for debugging\n",
"# Please email me the results. Either copy & paste the output, or attach the file report.txt\n",
"\n",
"!pip install -q requests speedtest-cli psutil setuptools\n",
"from diagnostics import Diagnostics\n",
"Diagnostics().run()"
]
}
],
"metadata": {