1. Error message: strptime() argument 1 must be str, not None

Error message: strptime() argument 1 must be str, not None

Home Forums FABRIC General Questions and Discussion Error message: strptime() argument 1 must be str, not None

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #8154
    Vaneshi Ramdhony
    Participant

      Hello FABRIC Team,

      We are trying to run this command in one of our codes and getting an error as below, while running with fabrictestbed-extensions 1.8.0

      Command:

      sites_connectx_json = fablib.list_sites(
          output=”json”,
          quiet=”true”,
          filter_function=lambda x: x[cx6_column_name] > 0 or x[cx5_column_name] > 0,
          latlon=False,
      )

      Error:

      File “…/fabric-jupyter/lib/python3.10/site-packages/fabrictestbed_extensions/fablib/resources.py”, line 630, in update
      raise Exception(
      Exception: Failed to get advertised_topology: Status.FAILURE, strptime() argument 1 must be str, not None

      We also ran the same command with fabrictestbed-extension 1.7.2 and this error was not showing up. Kindly advise what changes could cause the strptime() to fail and if there is any modifications we can make on our side for it to work.

      This is my output of pip3 list | grep fab

      fabric-credmgr-client 1.6.1
      fabric_fim 1.8.0
      fabric_fss_utils 1.6.0
      fabric-orchestrator-client 1.8.0
      fabric-paramiko-expect 1.0
      fabrictestbed 1.8.0
      fabrictestbed-extensions 1.8.1

      Thank you team,

      Regards,

      Vaneshi

      #8157
      Komal Thareja
      Participant

        Hi Vaneshi,

        I am unable to reproduce this with any of the JH containers. I do notice a small error in the API posted above. quiet parameter is a boolean.

        Could you please check the following?

        • You have a valid token in ~/.tokens.json
        • Try the snippet below


        from fabrictestbed_extensions.fablib.fablib import FablibManager as fablib_manager
        fablib = fablib_manager()
        cx5_column_name = 'nic_connectx_5_available'
        cx6_column_name = 'nic_connectx_6_available'
        sites_connectx_json = fablib.list_sites(
        output="json",
        quiet=True,
        filter_function=lambda x: x[cx6_column_name] > 0 or x[cx5_column_name] > 0,
        latlon=False,
        )
        print(sites_connectx_json)

        Please let me know if you still run into errors.

        Thanks,

        Komal

        #8177
        Vaneshi Ramdhony
        Participant

          Hello Komal,

          The token used is valid and I tried the suggested code snippet and also changed (quiet=True,) I am still getting the same error as before and in the same location; sites_connectx_json = fablib.list_sites( )

          Kindly let me know what else I can do/share from my end to help facilitate the debugging.

          Thank you for the assistance,

          Regards,
          Vaneshi

           

          #8183
          Komal Thareja
          Participant

            Reached out to Vaneshi via email to request a meeting to work to resolve this!

            Thanks,

            Komal

            #8188
            Komal Thareja
            Participant

              Issue resolved over zoom meeting, the issue was the token.

              Token file only had id_token instead of the entire token contents. Downloading the token file and using that resolved the issue.

              Please let us know if you run into any other issues. I have taken a note to return a more user friendly error. We will address this in the next release.

              Thanks,

              Komal

              #8189
              Vaneshi Ramdhony
              Participant

                Thank you for your support Komal. I shall ensure to include the entire token contents for next projects.

                 

                 

              Viewing 6 posts - 1 through 6 (of 6 total)
              • You must be logged in to reply to this topic.