Anleitung Web Interface

FletcherMops
Beiträge: 3
Registriert: Do 26. Okt 2017, 21:15
Hat sich bedankt: 0
Danksagung erhalten: 1 Mal

Re: Anleitung Web Interface

Beitrag von FletcherMops »

Ich brauche eure Hilfe :/
Bekomme auf dem Raspi die requirements nicht installiert.
Bekomme dann immer folgende Meldungen ausgegeben und weiß nicht was zu tun ist:
SPOILER
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pandas>=0.23.0
Using cached https://files.pythonhosted.org/packages ... 5.3.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_tpabj_9/pandas/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_tpabj_9/pandas/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-_tpabj_9/pandas/pip-egg-info
cwd: /tmp/pip-install-_tpabj_9/pandas/
Complete output (101 lines):
Processing numpy/random/_bounded_integers.pxd.in
Processing numpy/random/_generator.pyx
Traceback (most recent call last):
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/tools/cythonize.py", line 61, in process_pyx
from Cython.Compiler.Version import version as cython_version
ModuleNotFoundError: No module named 'Cython'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/tools/cythonize.py", line 238, in <module>
main()
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/tools/cythonize.py", line 234, in main
find_process_files(root_dir)
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/tools/cythonize.py", line 225, in find_process_files
process(root_dir, fromfile, tofile, function, hash_db)
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/tools/cythonize.py", line 191, in process
processor_function(fromfile, tofile)
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/tools/cythonize.py", line 66, in process_pyx
raise OSError('Cython needs to be installed in Python as a module')
OSError: Cython needs to be installed in Python as a module
Cythonizing sources
Running from numpy source directory.
/tmp/easy_install-x0z00e4q/numpy-1.18.0/setup.py:425: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/setup.py", line 450, in <module>

File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/setup.py", line 433, in setup_package
def finalize_options(self):
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/setup.py", line 240, in generate_cython
"""Custom distutils command to clean the .so and .pyc files."""
RuntimeError: Running cythonize failed!

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-_tpabj_9/pandas/setup.py", line 840, in <module>
**setuptools_kwargs
File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 128, in setup
_install_setup_requires(attrs)
File "/usr/local/lib/python3.6/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py", line 513, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 774, in resolve
replace_conflicting=replace_conflicting
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1057, in best_match
return self.obtain(req, installer)
File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1069, in obtain
return installer(requirement)
File "/usr/local/lib/python3.6/site-packages/setuptools/dist.py", line 580, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 699, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 884, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1152, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/usr/local/lib/python3.6/site-packages/setuptools/command/easy_install.py", line 1138, in run_setup
run_setup(setup_script, args)
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 253, in run_setup
raise
File "/usr/local/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python3.6/contextlib.py", line 99, in __exit__
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 166, in save_modules
saved_exc.resume()
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "/usr/local/lib/python3.6/site-packages/setuptools/_vendor/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
yield saved
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
yield
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "/usr/local/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/setup.py", line 450, in <module>

File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/setup.py", line 433, in setup_package
def finalize_options(self):
File "/tmp/easy_install-x0z00e4q/numpy-1.18.0/setup.py", line 240, in generate_cython
"""Custom distutils command to clean the .so and .pyc files."""
RuntimeError: Running cythonize failed!
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Hoffe ihr könnt mir helfen.
Tael
Beiträge: 5
Registriert: Sa 25. Jan 2020, 21:09
Hat sich bedankt: 0
Danksagung erhalten: 1 Mal

Re: Anleitung Web Interface

Beitrag von Tael »

Ich habe ein ähnliches Problem mit Windows:

Code: Alles auswählen

Collecting pycurl==7.43.0.2
  Using cached pycurl-7.43.0.2.tar.gz (214 kB)
    ERROR: Command errored out with exit status 10:
     command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Tim\\AppData\\Local\\Temp\\pip-install-lh9kmh65\\pycurl\\setup.py'"'"'; __file__='"'"'C:\\Users\\Tim\\AppData\\Local\\Temp\\pip-install-lh9kmh65\\pycurl\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Tim\AppData\Local\Temp\pip-install-lh9kmh65\pycurl\pip-egg-info'
         cwd: C:\Users\Tim\AppData\Local\Temp\pip-install-lh9kmh65\pycurl\
    Complete output (1 lines):
    Please specify --curl-dir=/path/to/built/libcurl
    ----------------------------------------
ERROR: Command errored out with exit status 10: python setup.py egg_info Check the logs for full command output.
Gibt es dazu eine Lösung?
Tael
Beiträge: 5
Registriert: Sa 25. Jan 2020, 21:09
Hat sich bedankt: 0
Danksagung erhalten: 1 Mal

Re: Anleitung Web Interface

Beitrag von Tael »

Hallo zusammen,

also bei meinem Debian 9 Server habe ich das selbe Problem. Ich habe die Version PyxURL schon auf die neue 7.43.0.4 angepasst und die Installation ans ende geschoben.

*EDIT*
Folgendes Packet fehlte:
apt-get install libcurl4-openssl-dev
Hab aber wieder den nächsten Fehler :-( Aber der Befehl

Code: Alles auswählen

pip3.6 install -r requirements.txt
Wird mal einwandfrei abgearbeitet.

Was fehlt mir hier wieder:

Code: Alles auswählen

root@SFBot:~/mfbot/mfbot-webinterface# python3.6 MainProgram.py -a http://127.0.0.1:1029/ --remoteU="***" --remoteP="****" --webU="***" --webP="***"
Traceback (most recent call last):
  File "MainProgram.py", line 2, in <module>
    import dash_auth
  File "/usr/local/lib/python3.6/site-packages/dash_auth/__init__.py", line 2, in <module>
    from .plotly_auth import PlotlyAuth  # noqa: F401
  File "/usr/local/lib/python3.6/site-packages/dash_auth/plotly_auth.py", line 9, in <module>
    from . import api_requests
  File "/usr/local/lib/python3.6/site-packages/dash_auth/api_requests.py", line 7, in <module>
    import requests
ModuleNotFoundError: No module named 'requests'

Folgende Benutzer bedankten sich beim Autor Tael für den Beitrag:
LostSoul (Fr 9. Jul 2021, 10:18)
Tael
Beiträge: 5
Registriert: Sa 25. Jan 2020, 21:09
Hat sich bedankt: 0
Danksagung erhalten: 1 Mal

Re: Anleitung Web Interface

Beitrag von Tael »

OK nun läuft es. wie kann ich das Web Interface im Hintergrund laufen lassen?
UnknownDeveloper
Core Developer
Beiträge: 407
Registriert: Sa 19. Mai 2018, 15:59
Hat sich bedankt: 22 Mal
Danksagung erhalten: 86 Mal

Re: Anleitung Web Interface

Beitrag von UnknownDeveloper »

Die Seite im Browser kannst du einfach schließen und für Linux empfehle ich Screen

VG
FletcherMops
Beiträge: 3
Registriert: Do 26. Okt 2017, 21:15
Hat sich bedankt: 0
Danksagung erhalten: 1 Mal

Re: Anleitung Web Interface

Beitrag von FletcherMops »

Habe den Bot auf dem Pi zum laufen gebracht und brauche nun unbedingt noch das Webinterface.
Beim Starten des Webinterfaces kam erst die Meldung, dass eine andere Dash Version benötigt wird, diese habe ich installiert und nun kommt beim Starten das:

Code: Alles auswählen

~/mfbot/webinterface $ python MainProgram.py -a http://127.0.0.1:1029/ --remoteU=Administrator --remoteP=******** --webU=Test --webP=1234
Traceback (most recent call last):
  File "MainProgram.py", line 24, in <module>
    from Functions import globalVariables, SettingsFun
ImportError: No module named Functions
Hat jemand eine Idee?

EDIT:
Zum Initialiseren der Pfade musste ich in den Unterordnern jeweils eine leere Datei mit Namen
__init__.py
erstellen.

Danach stieß Python auf mehrere Fehler zum Beispiel bei Scripts mit Umlauten oder anderen Sonderzeichen.
Da muss dann oben im Script die Zeile

Code: Alles auswählen

# This Python file uses the following encoding: utf-8
eingefügt werden.

Dann gab es einen weiteren Fehler, dass es kein "parse" gäbe.
Hier musste in der entsprechenden Zeile lediglich aus

Code: Alles auswählen

urllib.parse.quote_plus
das "parse" entfernt werden. Somit also:

Code: Alles auswählen

urllib.quote_plus
Nun läuft auch das Webinterface bei mir.
Bendas
Beiträge: 7
Registriert: Mo 5. Jul 2021, 10:51
Wohnort: Olomouc
Hat sich bedankt: 3 Mal
Danksagung erhalten: 4 Mal

Re: Instructions Web Interface

Beitrag von Bendas »

Hello,

I'm kinda stuck on this "error"? Could someone help me with that please? Thank you for all your answers!

I'm using Windows btw.
SPOILER
2021-07-05 12:00:38.318635 [Errors]: Legend: This is an error message
2021-07-05 12:00:38.319637 [Warnings]: Legend: This is a warning message
Traceback (most recent call last):
File "MainProgram.py", line 227, in <module>
initHTML()
File "MainProgram.py", line 68, in initHTML
initDetails()
File "MainProgram.py", line 34, in initDetails
AccountFun.updateAccs(False)
File "C:\Users\ondre\OneDrive\Desktop\Magical Fidget bot Web Interface\Functions\AccountFun.py", line 36, in updateAccs
details = ComUtils.curlGet("?head=1")
File "C:\Users\ondre\OneDrive\Desktop\Magical Fidget bot Web Interface\Utils\ComUtils.py", line 23, in curlGet
return json.loads(rString)
File "C:\Python35\lib\json\__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "C:\Python35\lib\json\decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Python35\lib\json\decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Press any key to continue . . .
Antworten

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 2 Gäste