Giter VIP home page Giter VIP logo

Comments (11)

StreamAlpha avatar StreamAlpha commented on July 25, 2024 1

since it uses selenium login, on any web services it will work in nologin mode only

from tvdatafeed.

prathameshjoshi avatar prathameshjoshi commented on July 25, 2024 1

so what is the alternative?

from tvdatafeed.

prathameshjoshi avatar prathameshjoshi commented on July 25, 2024 1

updated to latest version and token system works great. Issue sorted

from tvdatafeed.

carlitoselmago avatar carlitoselmago commented on July 25, 2024

I solved it just installing the git version

from tvdatafeed.

paras-1991 avatar paras-1991 commented on July 25, 2024

I am trying to run this on AWS lambda but getting following error:

[ERROR] FileNotFoundError: [Errno 2] No such file or directory: '/home/sbx_user1051/.tv_datafeed/'
Traceback (most recent call last):
  File "/var/task/lambda_function.py", line 8, in lambda_handler
    tv = TvDatafeed(username =username, password=password)
  File "/opt/python/lib/python3.8/site-packages/tvDatafeed/main.py", line 142, in init
    self.__assert_dir()
  File "/opt/python/lib/python3.8/site-packages/tvDatafeed/main.py", line 76, in __assert_dir
    os.mkdir(self.path)END
#######
I think it is not ablle to install chromedriver. maybe I need to change some path..I am stuck here..any help/guidance on this.

from tvdatafeed.

StreamAlpha avatar StreamAlpha commented on July 25, 2024

before initializing tvdatafeed, run the following code-

import os
from tvDatafeed import TvDatafeed,Interval
app_dir=os.mkdir(os.path.join(os.path.expanduser("~"), ".tv_datafeed/"))
if not os.path.exists(app_dir):
    os.mkdir(app_dir)

tv=TvDatafeed()

# your code goes here

This will only work without username and password. You will be able to download most of the data without logging in

from tvdatafeed.

paras-1991 avatar paras-1991 commented on July 25, 2024

thanks for such qucik response. I am still not able to get past the same error;

Response
{
"errorMessage": "[Errno 2] No such file or directory: '/home/sbx_user1051/.tv_datafeed/'",
"errorType": "FileNotFoundError",
"stackTrace": [
" File "/var/task/lambda_function.py", line 11, in lambda_handler\n app_dir=os.mkdir(os.path.join(os.path.expanduser("~"), ".tv_datafeed/"))\n"
]
}

Function Logs
START RequestId: 38fba4b8-18a5-47e0-90e1-a2d52afe647 Version: $LATEST
[ERROR] FileNotFoundError: [Errno 2] No such file or directory: '/home/sbx_user1051/.tv_datafeed/'
Traceback (most recent call last):
  File "/var/task/lambda_function.py", line 11, in lambda_handler
    app_dir=os.mkdir(os.path.join(os.path.expanduser("~"), ".tv_datafeed/"))END RequestId: 38fba4b8-18a5-47e-90e1-a2d5c2afe647

from tvdatafeed.

StreamAlpha avatar StreamAlpha commented on July 25, 2024

can you check if below works

import os
import tempfile
from tvDatafeed import TvDatafeed,Interval

app_dir=tempfile.TemporaryDirectory()
if not os.path.exists(app_dir):
    os.mkdir(app_dir)

TvDatafeed.path=app_dir
tv=TvDatafeed()

# your code goes here

from tvdatafeed.

paras-1991 avatar paras-1991 commented on July 25, 2024

still getting error.. I will try to initialize chromium driver and pass its path to chromedrive_path parameter in tvdatafeed. hoping that will resolve the issue. But now facing issue with chromium on python3.8.
if you are able to initialize tvdatafeed on aws lambda do let me know.. and if i am able to solve this i will surely post here.

from tvdatafeed.

StreamAlpha avatar StreamAlpha commented on July 25, 2024

I am using this on heroku dyno and its working fine. I am not familiar with aws lambda, looks like it has read only file system and does not support creating directories.

The issue seems in creating the temporary directory. Without login chromedriver is not required.
To fix this try creating some folder which you can access with script and set its path in tvdatafeed.

app_dir="any_folder_which_can_be_accessed_by_script"
if not os.path.exists(app_dir):
    os.mkdir(app_dir)

TvDatafeed.path=app_dir

from tvdatafeed.

StreamAlpha avatar StreamAlpha commented on July 25, 2024

on aws lambda /tmp is writeable

app_dir = "/tmp/.tv_datafeed/"
if not os.path.exists(app_dir):
    os.mkdir(app_dir)

TvDatafeed.path = app_dir

from tvdatafeed.

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.