benjamincham / freeoptionschain

Free Options Chain
MIT License
22 stars 3 forks source link

FOC.db is missing #3

Closed snas1690 closed 1 year ago

snas1690 commented 1 year ago

Completed all requirements but getting this error

import FOC Traceback (most recent call last): File "", line 1, in File "C:\ProgramData\Anaconda3\lib\site-packages\FOC__init__.py", line 2, in from .db import * ModuleNotFoundError: No module named 'FOC.db'

benjamincham commented 1 year ago

It seems like there might be an issue with the way you have imported and call the package.

please refer to demo.py on how you should import and use the library

benjamincham commented 1 year ago

mark close

lym-afla commented 1 year ago

I have got the same issue.

It seems the problem is in 'from .db import *' line in main.py. There is no db.py in FOC folder.

benjamincham commented 1 year ago

please refer to demo.py on how you should import and use the library, let me know if it works for you =)

snas1690 commented 1 year ago

from FOC import FOC Traceback (most recent call last): See below, imported exactly as in demo.py. Still getting the same issue.

File "", line 1, in from FOC import FOC

File "C:\ProgramData\Anaconda3\lib\site-packages\FOC__init__.py", line 2, in from .db import *

ModuleNotFoundError: No module named 'FOC.db'

snas1690 commented 1 year ago

from FOC import FOC Traceback (most recent call last):

File "", line 1, in from FOC import FOC

File "C:\ProgramData\Anaconda3\lib\site-packages\FOC__init__.py", line 2, in from .db import *

ModuleNotFoundError: No module named 'FOC.db'

benjamincham commented 1 year ago

may i check what is the python version you are using?

benjamincham commented 1 year ago

i have release version:0.01

please update the package, do let me know if you still encounter the same error pip install --upgrade freeoptionschain

Thanks!

snas1690 commented 1 year ago

(base) PS C:\Windows\system32> python --version Python 3.7.6

upgraded. Still have issue, see below

(base) PS C:\Windows\system32> python Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information.

from FOC import FOC Traceback (most recent call last): File "", line 1, in File "C:\ProgramData\Anaconda3\lib\site-packages\FOC__init__.py", line 2, in from .db import * ModuleNotFoundError: No module named 'FOC.db'

benjamincham commented 1 year ago

thanks for sharing the info, i'll check it out on a PC with windows OS.

I'll reopen the issue as a bug fix

snas1690 commented 1 year ago

Thanks a lot!

jfitz001 commented 1 year ago

Hi there, I think the commit is just missing the db.py file. I was able to get it to work by manually creating it.

benjamincham commented 1 year ago

i found out the reason for the error was because i did not provide the cython-compiled db library that is compatible for windows OS.

i have updated the repository with 'db.cp38-win_amd64.pyd', please update the package, do let me know if you still encounter the same error pip install freeoptionschain==0.6