Syntax Error when trying to replicate implementing Tensorboard with Google Colab Notebook












0















I am trying to recreate user joppe-geluykens answer to this question: Can I use Tensorboard with Google Colab?



Here is my code so far as suggested by his answer.



LOG_DIR = '/tmp/log'
get_ipython().system_raw(
'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &'
.format(LOG_DIR)
)

! wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip
! unzip ngrok-stable-windows-amd64.zip


get_ipython().system_raw('./ngrok http 6006 &')


The above code seems to run fine in the Google Notebook, it is the last step where I get the syntax error as follows:



! curl -s http://localhost:4040/api/tunnels | python3 -c 
"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/json/__init__.py", line 299, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Any suggestions would be very much appreciated. Thank you.










share|improve this question



























    0















    I am trying to recreate user joppe-geluykens answer to this question: Can I use Tensorboard with Google Colab?



    Here is my code so far as suggested by his answer.



    LOG_DIR = '/tmp/log'
    get_ipython().system_raw(
    'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &'
    .format(LOG_DIR)
    )

    ! wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip
    ! unzip ngrok-stable-windows-amd64.zip


    get_ipython().system_raw('./ngrok http 6006 &')


    The above code seems to run fine in the Google Notebook, it is the last step where I get the syntax error as follows:



    ! curl -s http://localhost:4040/api/tunnels | python3 -c 
    "import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"

    Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/usr/lib/python3.6/json/__init__.py", line 299, in load
    parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
    File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
    File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
    json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


    Any suggestions would be very much appreciated. Thank you.










    share|improve this question

























      0












      0








      0








      I am trying to recreate user joppe-geluykens answer to this question: Can I use Tensorboard with Google Colab?



      Here is my code so far as suggested by his answer.



      LOG_DIR = '/tmp/log'
      get_ipython().system_raw(
      'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &'
      .format(LOG_DIR)
      )

      ! wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip
      ! unzip ngrok-stable-windows-amd64.zip


      get_ipython().system_raw('./ngrok http 6006 &')


      The above code seems to run fine in the Google Notebook, it is the last step where I get the syntax error as follows:



      ! curl -s http://localhost:4040/api/tunnels | python3 -c 
      "import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"

      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.6/json/__init__.py", line 299, in load
      parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
      File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
      return _default_decoder.decode(s)
      File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
      raise JSONDecodeError("Expecting value", s, err.value) from None
      json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


      Any suggestions would be very much appreciated. Thank you.










      share|improve this question














      I am trying to recreate user joppe-geluykens answer to this question: Can I use Tensorboard with Google Colab?



      Here is my code so far as suggested by his answer.



      LOG_DIR = '/tmp/log'
      get_ipython().system_raw(
      'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &'
      .format(LOG_DIR)
      )

      ! wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip
      ! unzip ngrok-stable-windows-amd64.zip


      get_ipython().system_raw('./ngrok http 6006 &')


      The above code seems to run fine in the Google Notebook, it is the last step where I get the syntax error as follows:



      ! curl -s http://localhost:4040/api/tunnels | python3 -c 
      "import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"

      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.6/json/__init__.py", line 299, in load
      parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
      File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
      return _default_decoder.decode(s)
      File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
      raise JSONDecodeError("Expecting value", s, err.value) from None
      json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


      Any suggestions would be very much appreciated. Thank you.







      python python-3.x tensorflow tensorboard google-colaboratory






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 1 at 17:35









      CamCam

      608




      608
























          0






          active

          oldest

          votes











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53997537%2fsyntax-error-when-trying-to-replicate-implementing-tensorboard-with-google-colab%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53997537%2fsyntax-error-when-trying-to-replicate-implementing-tensorboard-with-google-colab%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          How to fix TextFormField cause rebuild widget in Flutter

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith