sharkbound / PythonTwitchBotFramework

asynchronous twitchbot framework made in pure python
MIT License
100 stars 26 forks source link

errors #57

Closed 1e3m closed 1 year ago

1e3m commented 1 year ago

Hello, i have error for version 2.10.0 py ver 3.6.6:

C:\Windows\system32>pip install git+https://github.com/sharkbound/PythonTwitchBo
tFramework.git@master
Collecting git+https://github.com/sharkbound/PythonTwitchBotFramework.git@master

  Cloning https://github.com/sharkbound/PythonTwitchBotFramework.git (to revisio
n master) to c:\users\lukin\appdata\local\temp\pip-req-build-lpino_vm
  Running command git clone -q https://github.com/sharkbound/PythonTwitchBotFram
ework.git 'C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm'
  Resolved https://github.com/sharkbound/PythonTwitchBotFramework.git to commit
d90c0003d5d2f01122e66f6e7ec2366a3d05e4fd
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'C:\Users\lukin\AppData\Local\Programs\Python\Python36\python.exe' -
c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\lukin
\\AppData\\Local\\Temp\\pip-req-build-lpino_vm\\setup.py'"'"'; __file__='"'"'C:\
\Users\\lukin\\AppData\\Local\\Temp\\pip-req-build-lpino_vm\\setup.py'"'"';f = g
etattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) els
e io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().r
eplace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"
'exec'"'"'))' egg_info --egg-base 'C:\Users\lukin\AppData\Local\Temp\pip-pip-egg
-info-3fso1aeu'
       cwd: C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm\
  Complete output (22 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm\setup.py", li
ne 2, in <module>
      from twitchbot import BOT_VERSION
    File "C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm\twitchbot\__i
nit__.py", line 6, in <module>
      from .arena import *
    File "C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm\twitchbot\are
na.py", line 5, in <module>
      from twitchbot.channel import Channel
    File "C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm\twitchbot\cha
nnel.py", line 9, in <module>
      from .api import StreamInfoApi
    File "C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm\twitchbot\api
\__init__.py", line 1, in <module>
      from .streaminfoapi import *
    File "C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm\twitchbot\api
\streaminfoapi.py", line 4, in <module>
      from .baseapi import Api
    File "C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm\twitchbot\api
\baseapi.py", line 2, in <module>
      from .. import util
    File "C:\Users\lukin\AppData\Local\Temp\pip-req-build-lpino_vm\twitchbot\uti
l\__init__.py", line 2, in <module>
      from .twitch_api_util import *
    File "<fstring>", line 1
      (await resp.text("utf-8"))
                ^
  SyntaxError: invalid syntax
  ----------------------------------------
WARNING: Discarding git+https://github.com/sharkbound/PythonTwitchBotFramework.g
it@master. Command errored out with exit status 1: python setup.py egg_info Chec
k the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check th
e logs for full command output.

If I download repo from pypi.org, I have this error at runtime with code :

from twitchbot import BaseBot

if __name__ == '__main__':
    BaseBot().run()

in ide: invalid syntax (<fstring>, line 1)

in py console:


Traceback (most recent call last):
  File "c:\program files (x86)\microsoft visual studio\2017\enterprise\common7\i
de\extensions\microsoft\python\core\ptvsd_launcher.py", line 119, in <module>
    vspd.debug(filename, port_num, debug_id, debug_options, run_as)
  File "c:\program files (x86)\microsoft visual studio\2017\enterprise\common7\i
de\extensions\microsoft\python\core\Packages\ptvsd\debugger.py", line 37, in deb
ug
    run(address, filename, *args, **kwargs)
  File "c:\program files (x86)\microsoft visual studio\2017\enterprise\common7\i
de\extensions\microsoft\python\core\Packages\ptvsd\_local.py", line 64, in run_f
ile
    run(argv, addr, **kwargs)
  File "c:\program files (x86)\microsoft visual studio\2017\enterprise\common7\i
de\extensions\microsoft\python\core\Packages\ptvsd\_local.py", line 125, in _run

    _pydevd.main()
  File "c:\program files (x86)\microsoft visual studio\2017\enterprise\common7\i
de\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\pydevd.py",
line 1752, in main
    globals = debugger.run(setup['file'], None, None, is_module)
  File "c:\program files (x86)\microsoft visual studio\2017\enterprise\common7\i
de\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\pydevd.py",
line 1099, in run
    return self._exec(is_module, entry_point_fn, module_name, file, globals, loc
als)
  File "c:\program files (x86)\microsoft visual studio\2017\enterprise\common7\i
de\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\pydevd.py",
line 1106, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "c:\program files (x86)\microsoft visual studio\2017\enterprise\common7\i
de\extensions\microsoft\python\core\Packages\ptvsd\_vendored\pydevd\_pydev_imps\
_pydev_execfile.py", line 25, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "C:\Users\lukin\source\repos\PythonApplication4\PythonApplication4\Python
Application4.py", line 1, in <module>
    from twitchbot import BaseBot
  File "C:\Users\lukin\AppData\Local\Programs\Python\Python36\lib\site-packages\
twitchbot\__init__.py", line 6, in <module>
    from .arena import *
  File "C:\Users\lukin\AppData\Local\Programs\Python\Python36\lib\site-packages\
twitchbot\arena.py", line 5, in <module>
    from twitchbot.channel import Channel
  File "C:\Users\lukin\AppData\Local\Programs\Python\Python36\lib\site-packages\
twitchbot\channel.py", line 9, in <module>
    from .api import StreamInfoApi
  File "C:\Users\lukin\AppData\Local\Programs\Python\Python36\lib\site-packages\
twitchbot\api\__init__.py", line 1, in <module>
    from .streaminfoapi import *
  File "C:\Users\lukin\AppData\Local\Programs\Python\Python36\lib\site-packages\
twitchbot\api\streaminfoapi.py", line 4, in <module>
    from .baseapi import Api
  File "C:\Users\lukin\AppData\Local\Programs\Python\Python36\lib\site-packages\
twitchbot\api\baseapi.py", line 2, in <module>
    from .. import util
  File "C:\Users\lukin\AppData\Local\Programs\Python\Python36\lib\site-packages\
twitchbot\util\__init__.py", line 2, in <module>
    from .twitch_api_util import *
  File "<fstring>", line 1
    (await resp.text("utf-8"))
              ^
SyntaxError: invalid syntax
Press any key to continue . . .
1e3m commented 1 year ago

I am successfully running a project in py 3.10.6 in the console, but I need to add "__allow_unmapped__ = True" in the db model. I think the topic will be closed.

sharkbound commented 1 year ago

File "C:\Users\lukin\AppData\Local\Programs\Python\Python36\lib\site-packages\ twitchbot\util__init__.py", line 2, in from .twitch_api_util import * File "", line 1 (await resp.text("utf-8")) ^ SyntaxError: invalid syntax

I will check into 3.6 compatibility today, and see if this is something i can solve.

am successfully running a project in py 3.10.6 in the console, but I need to add "allow_unmapped = True" in the db model.

This most likely has a better solution than just adding allow_unmapped = True, will see what i can find on this issue

Thanks for reporting this

sharkbound commented 1 year ago

working on the 3.6 compatibility issue now

sharkbound commented 1 year ago

Pushed/Published version 2.10.1 that fixes the 3.6 compatibility issues

sharkbound commented 1 year ago

Checking up on this, did the 2.10.1 fix this for you?

1e3m commented 1 year ago

Eh, sorry, I decided to stay on python 3.10 for now, I deleted 3.6 when I switched to 3.10, my Windows resisted, I haven’t downloaded updates yet, the main work now takes a lot of time :(

sharkbound commented 1 year ago

closing this for the time being, leave a new comment if you have any future issues relating to this.