Coder Social home page Coder Social logo

Comments (7)

kii-chan-reloaded avatar kii-chan-reloaded commented on May 30, 2024

Same issues with me on Linux. I got past that by adding a quick and dirty path append before the import:

...
from sys import path
from os.path import dirname
path.append(dirname(__file__))

from generate_classes import generate_classes
...

I'm sure there's a better/more elegant way of doing this; I was just trying to force my way through the install with pip.

There are still problems further down the line though. In ~/obswebsocket/core.py, it tries to do from . import events, but there is no ~/obswebsocket/events.py to import. Is there a file missing from this repo, or should events be imported from somewhere else?

I suppose that should probably be its own issue. If it's more than just a missing file from the repo, I'll open a new one.

from obs-websocket-py.

MikeJewski avatar MikeJewski commented on May 30, 2024

I took events.py from version 0.2, and got another error, seems something might be messed up. 0.2 still installs fine though.

from obs-websocket-py.

kii-chan-reloaded avatar kii-chan-reloaded commented on May 30, 2024

Looks like the events.py from version 0.2 works, it just needed some names updated. I have successfully installed obs-websocket-py with pip using these changes, and have put in a pull request. For anyone wanting to try installing it, download and extract the repo (or clone it using git), then run pip pointing to the directory. For example,

pip install ~/Downloads/obs-websocket-py/

from obs-websocket-py.

ethaniel avatar ethaniel commented on May 30, 2024

Same problem on windows:

C:\Users\Ark\Downloads\obscontrol>pip install obs-websocket-py
Collecting obs-websocket-py
  Using cached https://files.pythonhosted.org/packages/2c/82/125306f049d7517f6cbae078fe0dc4cb82df08d5a2b1018b7bbd753eadc8/obs-websocket-py-0.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\users\ark\appdata\local\temp\pip-build-wisnkj\obs-websocket-py\setup.py", line 9, in <module>
        from generate_classes import generate_classes
    ImportError: No module named generate_classes

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\ark\appdata\local\temp\pip-build-wisnkj\obs-websocket-py\
You are using pip version 9.0.3, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

from obs-websocket-py.

ErikBorra avatar ErikBorra commented on May 30, 2024

Same issue on raspbian, python 2.7:

pip install obs-websocket-py
Collecting obs-websocket-py
  Downloading https://files.pythonhosted.org/packages/2c/82/125306f049d7517f6cbae078fe0dc4cb82df08d5a2b1018b7bbd753eadc8/obs-websocket-py-0.3.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-f35XrB/obs-websocket-py/setup.py", line 9, in <module>
        from generate_classes import generate_classes
    ImportError: No module named generate_classes
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-f35XrB/obs-websocket-py/

I then tried pip install websocket-client and copied the obswebsocket directory into the root of my python project, as per manual install instructions on https://github.com/Elektordi/obs-websocket-py. Thereafter I had to manually put https://raw.githubusercontent.com/WolfgangAxel/obs-websocket-py/master/obswebsocket/events.py and https://raw.githubusercontent.com/WolfgangAxel/obs-websocket-py/master/obswebsocket/requests.py in the obswebsocket folder. Now all works fine.

from obs-websocket-py.

Elektordi avatar Elektordi commented on May 30, 2024

Hello,
(Sorry for the delay... :/ )

Just released version 0.4, it fixes a bug in the setup process, could you try again?

Best regards,

from obs-websocket-py.

Elektordi avatar Elektordi commented on May 30, 2024

No news is good news... Fell free to open it again if the problem is still here!
(I haven't got a Mac, so I cannot test myself...)

from obs-websocket-py.

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.