cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1099
Views
0
Helpful
3
Replies

SPARK APIC lab - traceback on check_dcloud.py

Steve Simlo
Cisco Employee
Cisco Employee

I am working here:

Cisco DevNet Learning Labs

I can SSH into the UBUNTU machine in the DCLOUD Sandbox:

SSIMLO-M-D00G:LM-4302 ssimlo$ ssh cisco@198.18.134.28

cisco@198.18.134.28's password:

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 4.4.0-42-generic x86_64)

* Documentation:  https://help.ubuntu.com/

206 packages can be updated.

148 updates are security updates.

Your Hardware Enablement Stack (HWE) is supported until April 2019.

Last login: Mon Jun 12 17:26:58 2017 from 10.16.51.148

Code-Samples were successfully updated.

Happy Coding!!!

(dna) cisco@ubuntu:~/CiscoDevNet/code/dna$

When I try to run the check_dcloud.py I get a traceback:

(dna) cisco@ubuntu:~/CiscoDevNet/code/dna/LM-4302$ python3 check_dcloud.py

Traceback (most recent call last):

  File "check_dcloud.py", line 9, in <module>

    from hello_lab import APIC_EM_URL

  File "/home/cisco/CiscoDevNet/code/dna/LM-4302/hello_lab.py", line 81, in <module>

    room_id = spark_get_room_id(SPARK_TOKN, SPARK_ROOM)

  File "/home/cisco/CiscoDevNet/code/dna/LM-4302/myspark.py", line 42, in spark_get_room_id

    r = requests.get(uri, params=query, headers=_headers(token))

  File "/home/cisco/CiscoDevNet/code/dna/LM-4302/myspark.py", line 15, in _headers

    'Authorization': 'Bearer ' + token}

TypeError: Can't convert 'NoneType' object to str implicitly

(dna) cisco@ubuntu:~/CiscoDevNet/code/dna/LM-4302$

I posted in the

DevNet Learning Labs

but got no reply

I opened a case with dCloud and they pointed me back here

3 Replies 3

Steve Simlo
Cisco Employee
Cisco Employee

I just span up another lab to see if the fault disappeared and it did not so it was not an issue specific to the instances I span up

hi ssimlo

we will get back to you with an answer ASAP.

thanks

eddie

armartir
Level 1
Level 1

Hi Steve,

In order to successfully run the check_dcloud.py script fist you will need to populate SPARK_TOKN and SPARK_ROOM variables located in hello_lab.py file.

Spark token can be obtained from https://developer.ciscospark.com/ page. After successful authentication, click on your avatar picture and access token will be displayed.

From Cisco Spark, pick a room where you would like to post a message and assign it to the SPARK_ROOM variable.

After that run the script and you should see a message on your terminal confirming that dCloud pod is ready for the labs.

PS. I will update the script so it will notify the user that important variables need to be populated.

Thank you!

Armen M.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: