Skip to content

Commit

Permalink
Update 01.Setup And Authentication.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
chuongmep committed Feb 27, 2024
1 parent f6e3f58 commit 90f8f9e
Showing 1 changed file with 14 additions and 44 deletions.
58 changes: 14 additions & 44 deletions docs/Tutorials/01.Setup And Authentication.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand All @@ -53,7 +53,7 @@
{
"data": {
"text/html": [
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>APSToolkit, 1.0.4</span></li></ul></div></div>"
"<div><div></div><div></div><div><strong>Installed Packages</strong><ul><li><span>APSToolkit, 1.0.5</span></li></ul></div></div>"
]
},
"metadata": {},
Expand All @@ -62,34 +62,11 @@
{
"data": {
"text/plain": [
"Loading extensions from `C:\\Users\\vho2\\.nuget\\packages\\microsoft.data.analysis\\0.20.1\\interactive-extensions\\dotnet\\Microsoft.Data.Analysis.Interactive.dll`"
"Loading extensions from `C:\\Users\\vho2\\.nuget\\packages\\microsoft.data.analysis\\0.21.1\\interactive-extensions\\dotnet\\Microsoft.Data.Analysis.Interactive.dll`"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"ename": "Error",
"evalue": "Failed to load kernel extension \"DataFrameKernelExtension\" from assembly C:\\Users\\vho2\\.nuget\\packages\\microsoft.data.analysis\\0.20.1\\interactive-extensions\\dotnet\\Microsoft.Data.Analysis.Interactive.dll",
"output_type": "error",
"traceback": [
"Failed to load kernel extension \"DataFrameKernelExtension\" from assembly C:\\Users\\vho2\\.nuget\\packages\\microsoft.data.analysis\\0.20.1\\interactive-extensions\\dotnet\\Microsoft.Data.Analysis.Interactive.dll"
]
},
{
"ename": "Error",
"evalue": "Microsoft.DotNet.Interactive.KernelExtensionLoadException: Failure loading Kernel Extension\r\n ---> System.MissingMethodException: Method not found: 'Void Microsoft.DotNet.Interactive.Commands.SubmitCode..ctor(System.String, System.String, Microsoft.DotNet.Interactive.Commands.SubmissionType)'.\r\n at Microsoft.Data.Analysis.Interactive.DataFrameKernelExtension.LoadExtensionApiAsync(Kernel cSharpKernel)\r\n at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)\r\n at Microsoft.Data.Analysis.Interactive.DataFrameKernelExtension.LoadExtensionApiAsync(Kernel cSharpKernel)\r\n at Microsoft.Data.Analysis.Interactive.DataFrameKernelExtension.OnLoadAsync(Kernel kernel)\r\n at Microsoft.DotNet.Interactive.App.PackageDirectoryExtensionLoader.LoadFromAssemblyFile(FileInfo assemblyFile, Kernel kernel, KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\dotnet-interactive\\PackageDirectoryExtensionLoader.cs:line 124\r\n --- End of inner exception stack trace ---",
"output_type": "error",
"traceback": [
"Microsoft.DotNet.Interactive.KernelExtensionLoadException: Failure loading Kernel Extension\r\n",
" ---> System.MissingMethodException: Method not found: 'Void Microsoft.DotNet.Interactive.Commands.SubmitCode..ctor(System.String, System.String, Microsoft.DotNet.Interactive.Commands.SubmissionType)'.\r\n",
" at Microsoft.Data.Analysis.Interactive.DataFrameKernelExtension.LoadExtensionApiAsync(Kernel cSharpKernel)\r\n",
" at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)\r\n",
" at Microsoft.Data.Analysis.Interactive.DataFrameKernelExtension.LoadExtensionApiAsync(Kernel cSharpKernel)\r\n",
" at Microsoft.Data.Analysis.Interactive.DataFrameKernelExtension.OnLoadAsync(Kernel kernel)\r\n",
" at Microsoft.DotNet.Interactive.App.PackageDirectoryExtensionLoader.LoadFromAssemblyFile(FileInfo assemblyFile, Kernel kernel, KernelInvocationContext context) in D:\\a\\_work\\1\\s\\src\\dotnet-interactive\\PackageDirectoryExtensionLoader.cs:line 124\r\n",
" --- End of inner exception stack trace ---"
]
}
],
"source": [
Expand All @@ -98,7 +75,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -131,7 +108,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -167,7 +144,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 4,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -202,7 +179,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 5,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down Expand Up @@ -251,7 +228,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 8,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand All @@ -265,23 +242,16 @@
},
"outputs": [
{
"ename": "Error",
"evalue": "(5,1): error CS0246: The type or namespace name 'Scope' could not be found (are you missing a using directive or an assembly reference?)\r\n(7,76): error CS1503: Argument 3: cannot convert from 'Scope[]' to 'Autodesk.Forge.Scope[]'\r\n(5,21): error CS0246: The type or namespace name 'Scope' could not be found (are you missing a using directive or an assembly reference?)\r\n(6,6): error CS0103: The name 'Scope' does not exist in the current context\r\n(6,22): error CS0103: The name 'Scope' does not exist in the current context\r\n(6,39): error CS0103: The name 'Scope' does not exist in the current context\r\n(6,57): error CS0103: The name 'Scope' does not exist in the current context\r\n(6,75): error CS0103: The name 'Scope' does not exist in the current context",
"output_type": "error",
"traceback": [
"(5,1): error CS0246: The type or namespace name 'Scope' could not be found (are you missing a using directive or an assembly reference?)\r\n",
"(7,76): error CS1503: Argument 3: cannot convert from 'Scope[]' to 'Autodesk.Forge.Scope[]'\r\n",
"(5,21): error CS0246: The type or namespace name 'Scope' could not be found (are you missing a using directive or an assembly reference?)\r\n",
"(6,6): error CS0103: The name 'Scope' does not exist in the current context\r\n",
"(6,22): error CS0103: The name 'Scope' does not exist in the current context\r\n",
"(6,39): error CS0103: The name 'Scope' does not exist in the current context\r\n",
"(6,57): error CS0103: The name 'Scope' does not exist in the current context\r\n",
"(6,75): error CS0103: The name 'Scope' does not exist in the current context"
"name": "stdout",
"output_type": "stream",
"text": [
"Token Authentication Successful\r\n"
]
}
],
"source": [
"using APSToolkit.Auth;\n",
"using Autodesk.Forge;\n",
"var clientID = Environment.GetEnvironmentVariable(\"APS_CLIENT_ID\", EnvironmentVariableTarget.User);\n",
"var clientSecret = Environment.GetEnvironmentVariable(\"APS_CLIENT_SECRET\", EnvironmentVariableTarget.User);\n",
"var refreshToken = Environment.GetEnvironmentVariable(\"APS_REFRESH_TOKEN\", EnvironmentVariableTarget.User);\n",
Expand Down Expand Up @@ -312,7 +282,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 9,
"metadata": {
"dotnet_interactive": {
"language": "csharp"
Expand Down

0 comments on commit 90f8f9e

Please sign in to comment.