Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't find config.json #1

Closed
hugeblank opened this issue Oct 27, 2021 · 10 comments
Closed

Can't find config.json #1

hugeblank opened this issue Oct 27, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@hugeblank
Copy link
Contributor

on attempting to run pulsemeeter I get an error and traceback:

Traceback (most recent call last):
  File "/usr/local/bin/pulsemeeter", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/pulsemeeter/__main__.py", line 33, in main
    with open(config_file, 'w') as outfile:
FileNotFoundError: [Errno 2] No such file or directory: '/home/hugeblank/.config/pulsemeeter/config.json'

Also - instructions on how to install dependencies would be nice, as I'm pretty sure I don't even have them properly set up.

@theRealCarneiro
Copy link
Owner

Thanks for writing the issue , try running mkdir -p $HOME/.config/pulsemeeter. I forgot to create that directory. As for how to install the dependencies, pip already installs all python required dependencies (unless you're using python setyp.py install, then you'd have to download pygobject and setuptools with pip), for noise-suppression-for-voice and swh-plugins the instructions are on their git pages.

@theRealCarneiro
Copy link
Owner

theRealCarneiro commented Oct 27, 2021

Just released a new version v1.2.2, it should fix the issue without having to run mkdir

@theRealCarneiro theRealCarneiro added the bug Something isn't working label Oct 27, 2021
@hugeblank
Copy link
Contributor Author

hugeblank commented Oct 27, 2021

I know this isn't exactly your fault, but I straight up can't install the swh-plugins library. I tried installing it using the master branch as well as the last released version back in 2016, and get swh/ladspa#60. And don't even get me started on all the little packages that both ladspa and noise-suppression-for-voice depended on for compiling that they didn't mention in their dependencies. Surely there's a better solution than this?

Edit: What I mean by better solution is a dumbed down one. I'm coming from a CS background and enjoy resolving issues like these. I also live stream and love listening to music, but need to redirect it through a virtual input to a specific track, to get around twitch DMCA concerns. I assume there are going to be a lot more people that do the streaming part, and a lot less people that do the resolving issues part. Having something like a .deb package, where it's just a button press installation process would be the absolute ideal for me, and the rest of the community that could find some use from this tool.

Edit 2: I can't be any dumber, just found this: https://github.com/theRealCarneiro/pulsemeeter/wiki/Installation

@hugeblank
Copy link
Contributor Author

Found another where a config should exist but doesn't:

Traceback (most recent call last):
  File "/usr/local/bin/pulsemeeter", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/pulsemeeter/__main__.py", line 59, in main
    pulse = Pulse()
  File "/usr/local/lib/python3.9/dist-packages/pulsemeeter/Pulse.py", line 12, in __init__
    self.read_config()
  File "/usr/local/lib/python3.9/dist-packages/pulsemeeter/Pulse.py", line 287, in read_config
    config_orig = json.load(open(config_orig))
FileNotFoundError: [Errno 2] No such file or directory: '/home/hugeblank/.local/lib/python3.9/site-packages/pulsemeeter/config.json'

This one is fun because even after creating the directory, and running touch config.json and adding an empty JSON object into it, I get this error:

Traceback (most recent call last):
  File "/usr/local/bin/pulsemeeter", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/pulsemeeter/__main__.py", line 59, in main
    pulse = Pulse()
  File "/usr/local/lib/python3.9/dist-packages/pulsemeeter/Pulse.py", line 12, in __init__
    self.read_config()
  File "/usr/local/lib/python3.9/dist-packages/pulsemeeter/Pulse.py", line 291, in read_config
    for k in config_orig[i][j]:
KeyError: 'a'

@theRealCarneiro
Copy link
Owner

Can you check if there's a config.json in /usr/local/lib/python3.9/dist-packages/pulsemeeter? I was not able to reproduce the bug. Abou the .deb package, i'll have to read more about those because I'm not familiar with debian and ubuntu.
I made that wiki page today after you wrote the issue, also you dont really need swh and noise supression for voice for pulsemeeter to work, you just wont be able to use eq's and the noise reduction feature, everything else will work normally

@hugeblank
Copy link
Contributor Author

hugeblank commented Oct 27, 2021

Can you check if there's a config.json in /usr/local/lib/python3.9/dist-packages/pulsemeeter? I was not able to reproduce the bug.

There is, but it's expecting a config file in site-packages, not dist-packages.

I made that wiki page today after you wrote the issue

ohhh okay, I thought I just totally missed it. Thank you for clarifying the installation instructions in that case.

you dont really need swh and noise supression for voice for pulsemeeter to work, you just wont be able to use eq's and the noise reduction feature, everything else will work normally

You should probably mark them as optional dependencies then and specify the features that will not work on your installation page, that would be really helpful for anyone that just would like what is effectively a virtual audio cable.

@theRealCarneiro
Copy link
Owner

There is, but it's expecting a config file in site-packages, not dist-packages.

That makes sense, i didn't take into consideration the fact that it could use a different directory

You should probably mark them as optional dependencies then and specify the features that will not work on your installation page, that would be really helpful for anyone that just would like what is effectively a virtual audio cable.

Did just that

@theRealCarneiro
Copy link
Owner

Just pushed a new commit (2915b8d), can you please check if it works?

@hugeblank
Copy link
Contributor Author

works!
image
Now to figure out how to get spotify to redirect to a virtual input

@theRealCarneiro
Copy link
Owner

Having something like a .deb package, where it's just a button press installation process would be the absolute ideal for me

Just released v1.2.3 and it has a .deb installer, plus you can now download it with pip without downloading the source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants