osilkin98 / PyBRY

Python API Wrapper for LBRY & LBRYCRD
MIT License
5 stars 4 forks source link

Cannot install package from github repo (could be PEBKAC) #1

Open eggplantbren opened 5 years ago

eggplantbren commented 5 years ago

I hope this is actually a bug and I'm not wasting your time.

I installed this package using pip, but it seems like an old version where LbrydApi was called LbryApi. So I thought I'd install it by cloning the repo instead. However, when I run the install command I get this error:

brewer@brendon-laptop:~/Projects/PyBRY$ apython setup.py build_py install
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from generator import generate_lbryd_wrapper
  File "/home/brewer/Projects/PyBRY/generator.py", line 4, in <module>
    from pybry.constants import LBRY_API_RAW_JSON_URL
  File "/home/brewer/Projects/PyBRY/pybry/__init__.py", line 1, in <module>
    from .lbryd_api import LbrydApi
ImportError: cannot import name 'LbrydApi' from 'pybry.lbryd_api' (/home/brewer/Projects/PyBRY/pybry/lbryd_api.py)

I'm using Anaconda 5.3.1 / Python 3.7.2 on Manjaro Linux (apython in my above command is just my alias to that version of Python).

vhpvmx commented 4 years ago

I am using the pip version package, i start using the library as LbryApi it works ok, but it is necessary to update the name according to the docs.

pavlo-seimskyi commented 4 years ago

In the file "lbryd_api.py" the name of the first class is wrong: instead of "LbrydApi" there is "LbryApi" To fix it, you need to add the letter d to the class name making it "LbrydApi": image

belikor commented 3 years ago

This is solved with the recently merged #3.