athphane / userbot

Telegram Userbot built with Pyrogram
GNU General Public License v3.0
152 stars 103 forks source link

No section name mongo #50

Closed LightYagami28 closed 3 years ago

LightYagami28 commented 3 years ago

File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details import(pkg_name) File "/root/userbot/userbot/init.py", line 45, in MONGO_URL = config.get("mongo", "url") File "/usr/lib/python3.9/configparser.py", line 781, in get d = self._unify_values(section, vars) File "/usr/lib/python3.9/configparser.py", line 1149, in _unify_values raise NoSectionError(section) from None configparser.NoSectionError: No section: 'mongo' Immagine 2021-06-09 100336

athphane commented 3 years ago

Refer to userbot.ini.sample for required variables in the userbot.ini file

LightYagami28 commented 3 years ago

Ok thanks

LightYagami28 commented 3 years ago

Traceback (most recent call last): File "/usr/lib/python3.9/runpy.py", line 188, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.9/runpy.py", line 147, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/lib/python3.9/runpy.py", line 111, in _get_module_details import(pkg_name) File "/home/ubuntu/Clienti/@mydripistalen/Pyrogram-Userbot/userbot/init.py", line 45, in MONGO_URL = config.get("mongo", "url") File "/usr/lib/python3.9/configparser.py", line 781, in get d = self._unify_values(section, vars) File "/usr/lib/python3.9/configparser.py", line 1149, in _unify_values raise NoSectionError(section) from None configparser.NoSectionError: No section: 'mongo'

I'm using mongodb atlas

LightYagami28 commented 3 years ago

What i do to fix?

athphane commented 3 years ago

Pls check userbot.ini.sample file and make sure you have sections set up properly.

LightYagami28 commented 3 years ago

I setup properly the userbot.ini.sample but i don't resolve my problem

LightYagami28 commented 3 years ago

image

LightYagami28 commented 3 years ago

@athphane Pls help me

athphane commented 3 years ago

Ok so the main issue is you have a bunch of unnecessary things in the url value. You only need everything starting from “mongodb+Srv” to “myFirstDatabase”.

LightYagami28 commented 3 years ago

Same error

LightYagami28 commented 3 years ago

image

LightYagami28 commented 3 years ago

I don't know in any way how to fix

athphane commented 3 years ago

Are you editing userbot.ini.sample directly? Don't you have a userbot.ini file?

https://github.com/athphane/userbot/issues/50#issuecomment-857487553

LightYagami28 commented 3 years ago

I edited the userbot.ini.sample file and finally turned it into userbot.ini

LightYagami28 commented 3 years ago

@phoenixatom do you know the fix?

athphane commented 3 years ago

the error clearly states that the section is missing. Therefore it is not in your userbot.ini file.

Steps 1- copy userbot.ini.sample to userbot.ini 2- fill in all the values 3- make sure all the sections are there. 4- run

I know the code in my repository works fine when you have the userbot.ini file. I also now notice that you’re asking for help regarding your fork. I know it’s the same code but since yours is modified I cannot confirm that it will work exactly how I have described.

Please ask further questions that are directly related to this repository.

LightYagami28 commented 3 years ago

Oh thank you very much

LightYagami28 commented 3 years ago

I resolved the issues thank you so much and excuse me