Git Product home page Git Product logo

Comments (2)

bkc39 avatar bkc39 commented on August 21, 2024

Looks like this also affects catalyst ingest:

(catalyst-venv) bash-3.2$ catalyst ingest
catalyst ingest
Traceback (most recent call last):
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst-venv/bin/catalyst", line 7, in <module>
    from catalyst.__main__ import main
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/__init__.py", line 20, in <module>
    from . import data
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/data/__init__.py", line 1, in <module>
    from . import loader
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/data/loader.py", line 36, in <module>
    from catalyst.curate.poloniex import PoloniexCurator
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst-venv/lib/python3.6/site-packages/catalyst/curate/poloniex.py", line 9
    DT_START        = time.mktime(datetime(2010, 01, 01, 0, 0).timetuple())

The fix is straightforward, but then this module starts complaining about mixing tabs and spaces. When that is done I get:

(catalyst-venv) Bens-MacBook-Pro:catalyst bkc$ python
Python 3.6.1 (default, Apr  4 2017, 09:40:21)
[GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> from catalyst.api import cancel_order
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst/__init__.py", line 20, in <module>
    from . import data
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst/data/__init__.py", line 1, in <module>
    from . import loader
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst/data/loader.py", line 37, in <module>
    from catalyst.utils.calendars import get_calendar
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst/utils/calendars/__init__.py", line 16, in <module>
    from .trading_calendar import TradingCalendar
  File "/Users/bkc/Documents/code/projects/catalyst/catalyst/utils/calendars/trading_calendar.py", line 30, in <module>
    from catalyst.utils.calendars._calendar_helpers import (
ModuleNotFoundError: No module named 'catalyst.utils.calendars._calendar_helpers'

Are we sure that the catalyst source directory is added to PYTHONPATH when the virtualenv is fired up?

If not, I can add the .pth to catalyst-venv site packages.

from catalyst.

cfromknecht avatar cfromknecht commented on August 21, 2024

The formatting and indentation problems were solved by this pull request: #4

For others who encounter the latter bug, this seems to have been caused by running the python interpreter from the repository's working directory, as this causes it to import the source files directly, instead of the importing the files installed in the virtualenv or in the user's site-packages. The above error is failing to find one of the compiled classes, _calendar_helpers, that does not get built in the source directory. It's probably best to avoid importing catalyst from any file in the repo's top-level directory to avoid confusion.

Thanks @bkc39 for your help on this issue!

from catalyst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.