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

Error when running script #2

Open
ustoopia opened this issue Aug 2, 2023 · 4 comments
Open

Error when running script #2

ustoopia opened this issue Aug 2, 2023 · 4 comments

Comments

@ustoopia
Copy link

ustoopia commented Aug 2, 2023

Hi. I know this repo is a couple of years old. But I still wanted to try if it works, since it would be an ideal solution for me. Unfortunately, I get the following error message when I run the script. I did successfully install the requirements before.

Traceback (most recent call last):
  File "/opt/nginx-rtmp-auth/rtmpauth.py", line 11, in <module>
    hostPort = config.getint('main', 'bind_to_port')
  File "/usr/lib/python3.10/configparser.py", line 820, in getint
    return self._get_conv(section, option, int, raw=raw, vars=vars,
  File "/usr/lib/python3.10/configparser.py", line 810, in _get_conv
    return self._get(section, conv, option, raw=raw, vars=vars,
  File "/usr/lib/python3.10/configparser.py", line 805, in _get
    return conv(self.get(section, option, **kwargs))
ValueError: invalid literal for int() with base 10: '88 # Port to bind to'

I'm using Python 3.10.12 on Ubuntu 22.04

@Xathz
Copy link
Member

Xathz commented Aug 2, 2023

Maybe a config file issue. Check the port number is an integer not a string.

@ustoopia
Copy link
Author

ustoopia commented Aug 4, 2023

Maybe a config file issue. Check the port number is an integer not a string.

How do I check that?
I haven't touched the config file. It says port 88.

@tt2468
Copy link
Member

tt2468 commented Aug 4, 2023

Try removing the comments from the INI file (as done here 94ea678)

Configparser can't parse ini comments, so it was causing it to break.

@ustoopia
Copy link
Author

ustoopia commented Aug 4, 2023

Try removing the comments from the INI file (as done here 94ea678)

Configparser can't parse ini comments, so it was causing it to break.

Right! That indeed did the trick. I somehow feel that I should have known this, if I had even a bit of knowledge on coding. But since I don't, I just want to thank you very much for explaining it to me.
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants