Giter VIP home page Giter VIP logo

databay's People

Contributors

cdpierse avatar dependabot[bot] avatar voyz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

databay's Issues

Apsplanner failed to import [Resolved]

Error on line: "from databay.planners import APSPlanner"

I forget the exact error message and I'm unable to recreate the error now for some reason

Looked like maybe some kind of issue linking the library on installation. When I uncommented line 9 of the init file the issue was resolved and everything worked as expected. Now when I comment that line out everything still works as expected and the error is gone.

ImportError: cannot import name 'ASPlanner' from 'databay.planners'

Describe the bug
After fixing importlib error per this issue, then I am getting the following error:

Traceback (most recent call last):
  File "blockchain_demo.py", line 6, in <module>
    from databay.planners import ASPlanner
ImportError: cannot import name 'ASPlanner' from 'databay.planners' (/home/pybokeh/envs/streaming_dev/lib/python3.8/site-packages/databay/planners/__init__.py)

To Reproduce
I executed the following code:

import datetime

from databay.inlets import HttpInlet
from databay.outlets import PrintOutlet
from databay import Link
from databay.planners import ASPlanner

stock_inlet = HttpInlet('https://blockchain.info/ticker')

print_outlet = PrintOutlet(True, True)

link = Link(stock_inlet, print_outlet, interval=datetime.timedelta(seconds=1))

planner = ASPlanner(link)

planner.start()

Environment
Databay version: 0.1.2
Python version: 3.8.2
OS: Ubuntu 20.04 and Windows 10

pip freeze output:

aiohttp==3.6.2
APScheduler==3.6.3
async-timeout==3.0.1
attrs==20.1.0
chardet==3.0.4
databay==0.1.2
idna==2.10
multidict==4.7.6
pytz==2020.1
schedule==0.6.0
six==1.15.0
tzlocal==2.1
yarl==1.5.1

AttributeError: module 'importlib' has no attribute 'util'

Describe the bug
When trying to run blockchain example, got the following error:

Traceback (most recent call last):
  File "blockchain_demo.py", line 3, in <module>
    from databay.inlets import HttpInlet
  File "/home/pybokeh/envs/streaming_dev/lib/python3.8/site-packages/databay/inlets/__init__.py", line 3, in <module>
    if importlib.util.find_spec('aiohttp') is not None:
AttributeError: module 'importlib' has no attribute 'util'

To Reproduce
Example code (blockchain example):

import datetime

from databay.inlets import HttpInlet
from databay.outlets import PrintOutlet
from databay import Link
from databay.planners import APSPlanner

stock_inlet = HttpInlet('https://blockchain.info/ticker')

print_outlet = PrintOutlet(True, True)

link = Link(stock_inlet, print_outlet, interval=datetime.timedelta(seconds=1))

planner = APSPlanner(link)

planner.start()

Environment
Databay version: 0.1.2
Python version: 3.8.2
OS: Ubuntu 20.04 and Windows 10

pip freeze output:

aiohttp==3.6.2
APScheduler==3.6.3
async-timeout==3.0.1
attrs==20.1.0
chardet==3.0.4
databay==0.1.2
idna==2.10
multidict==4.7.6
pytz==2020.1
schedule==0.6.0
six==1.15.0
tzlocal==2.1

Suggest a Fix
Replace: import importlib with import importlib.util in the _init_.py file located in the inlets folder.

Source tarball contains out-dated setup.py

Describe the bug
Creating a RPM packages from the 0.1.5 produces .egg-info that uses the previous version (0.1.4).

To Reproduce
Steps to reproduce the behavior:

  1. Download source
  2. Extract source
  3. cat databay-0.1.5/setup.py | grep version -> version = '0.1.4',

Expected behavior
Be able to create the needed content with the current release number.

Environment
Databay version: 0.1.5
Python version: Python 3.8.5
OS: Fedora 32/Rawhide

Suggest a Fix
Tag the source after all files are pushed to the repo. Publish a new release 0.1.6 as PyPI doesn't allow the re-upload of an existing release source tarball.

Windows 10 - RuntimeError: Event loop is closed and UnicodeEncodeError: 'charmap' codec can't encode character

Not a bug, but perhaps it should be mentioned that databay will not work with Windows 10 due to a bug or the way asyncio chooses the default event loop mechanism, which throws an error, instead of just a warning.

So if running asyncio-dependent code on Windows machine, you will get an error similar below:

Traceback (most recent call last):
  File "C:\Programs\Python38\lib\asyncio\proactor_events.py", line 95, in __del__
    self.close()
  File "C:\Programs\Python38\lib\asyncio\proactor_events.py", line 86, in close
    self._loop.call_soon(self._call_connection_lost, None)
  File "C:\Programs\Python38\lib\asyncio\base_events.py", line 683, in call_soon
    self._check_closed()
  File "C:\Programs\Python38\lib\asyncio\base_events.py", line 475, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

Per this SO question, possible workaround is to use asyncio loop's run_until_complete() instead of just run()


(Update 1 by Voy - added more info)

To Reproduce
Example code (blockchain example):

import datetime

from databay.inlets import HttpInlet
from databay.outlets import PrintOutlet
from databay import Link
from databay.planners import APSPlanner

stock_inlet = HttpInlet('https://blockchain.info/ticker')

print_outlet = PrintOutlet(True, True)

link = Link(stock_inlet, print_outlet, interval=datetime.timedelta(seconds=1))

planner = APSPlanner(link)

planner.start()

Environment
Databay version: 0.1.2
Python version: 3.8.2
OS: Ubuntu 20.04 and Windows 10


(Update 2 by Voy - explaining the true issue)

The RuntimeError: Event loop is closed is only half of the problem here, and in fact is not the cause for the code to stop working, but a side effect happening when program terminates and can be fixed easily. The code wouldn't execute due to UnicodeEncodeError, which we figure out later down the line.

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.