Navigation

    Quantiacs Community

    • Register
    • Login
    • Search
    • Categories
    • News
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    Colab new error 'EntryPoints' object has no attribute 'get'

    Support
    4
    5
    429
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gjhernandezp last edited by

      I was running strategies from Colab whitout any problem but now I am getting this error even in the example form

      • https://quantiacs.com/documentation/en/user_guide/local_development.html#google-colab-support
      • https://quantiacs.com/documentation/en/_static/colab.ipynb

      =================

      import xarray as xr

      import qnt.stats as qnstats
      import qnt.data as qndata
      import qnt.output as qnout
      import qnt.ta as qnta
      import qnt.backtester as qnbt
      import qnt.graph as qngraph

      def load_data(period):
      return qndata.stocks.load_ndx_data(tail=period)

      def strategy(data):
      close = data.sel(field="close")
      is_liquid = data.sel(field="is_liquid")
      sma_slow = qnta.sma(close, 200).isel(time=-1)
      sma_fast = qnta.sma(close, 20).isel(time=-1)
      weights = xr.where(sma_slow < sma_fast, 1, -1)
      weights = weights * is_liquid
      return weights

      weights = qnbt.backtest(
      competition_type = "stocks_nasdaq100",
      load_data = load_data,
      lookback_period = 365*4,
      start_date = "2006-01-01",
      strategy = strategy,
      analyze = True,
      build_plots = True
      )

      ===============

      Run last pass...
      Load data...

      AttributeError Traceback (most recent call last)
      <ipython-input-5-ef8fa45745b7> in <module>
      32 strategy = strategy,
      33 analyze = True,
      ---> 34 build_plots = True
      35 )

      9 frames
      /usr/local/lib/python3.7/dist-packages/xarray/backends/plugins.py in list_engines()
      103 @functools.lru_cache(maxsize=1)
      104 def list_engines():
      --> 105 entrypoints = entry_points().get("xarray.backends", ())
      106 return build_engines(entrypoints)
      107

      AttributeError: 'EntryPoints' object has no attribute 'get'

      1 Reply Last reply Reply Quote 0
      • G
        gjhernandezp last edited by

        It seems that is a problem with the newer 0.20.2 version of xarray in Coab because I have the same problem running the Xarray Turorial from http://gallery.pangeo.io/repos/pangeo-data/pangeo-tutorial-gallery/xarray.html#Table-of-contents

        I added to before any other cell

        !pip uninstall xarray -y
        !pip install xarray==0.19.0

        And is working now.

        support 1 Reply Last reply Reply Quote 1
        • support
          support @gjhernandezp last edited by

          @gjhernandezp Thank you for sharing your solution!

          1 Reply Last reply Reply Quote 0
          • L
            linen.vileplume Banned last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote 0
            • X
              xfinityauthorize Banned last edited by

              This post is deleted!
              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB | Contributors
              • Documentation
              • About
              • Career
              • My account
              • Privacy policy
              • Terms and Conditions
              • Cookies policy
              Home
              Copyright © 2014 - 2021 Quantiacs LLC.
              Powered by NodeBB | Contributors