W01fh4cker / Serein

【懒人神器】一款图形化、批量采集url、批量对采集的url进行各种nday检测的工具。可用于src挖掘、cnvd挖掘、0day利用、打造自己的武器库等场景。可以批量利用Actively Exploited Atlassian Confluence 0Day CVE-2022-26134和DedeCMS v5.7.87 SQL注入 CVE-2022-23337。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_tkinter.TclError: no display name and no $DISPLAY environment variable

2697106714 opened this issue · comments

[root@iris-ft-lv-ws01 Serein]# python3 Serein.py
Traceback (most recent call last):
File "/root/Serein/Serein.py", line 60, in
window = tk.Tk()
File "/usr/local/python3/lib/python3.9/site-packages/ttkbootstrap/style.py", line 5142, in __init__wrapper
func(self, *args, **kwargs)
File "/usr/local/python3/lib/python3.9/tkinter/init.py", line 2263, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

You are Linux system, you should use http://github.com/W01fh4cker/Serein_Linux

[root@iris-ft-lv-ws01 Serein_Linux]# python3 Serein_Linux.py
Traceback (most recent call last):
File "/root/Serein_Linux/Serein_Linux.py", line 45, in
window = tk.Tk()
File "/usr/local/python3/lib/python3.9/site-packages/ttkbootstrap/style.py", line 5142, in __init__wrapper
func(self, *args, **kwargs)
File "/usr/local/python3/lib/python3.9/tkinter/init.py", line 2263, in init
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

ubuntu:
1.apt install python3-tk
2.apt install tk-dev
centos:
1.yum -y install python3-tk
2.yum -y install tk-dev(if error,try:yum -y install tk*)

[root@iris-ft-lv-ws01 Serein_Linux]# python3 Serein_Linux.py
Traceback (most recent call last):
File "Serein_Linux.py", line 4, in
from PIL.ImageTk import PhotoImage
ModuleNotFoundError: No module named 'PIL'

try:pip uninstall pillow pip install pillow
if error,try:pip uninstall pillow pip install pillow-PIL

[root@iris-ft-lv-ws01 Serein_Linux]# pip install pillow
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in
load_entry_point('pip==8.1.2', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python2.7/site-packages/pip/init.py", line 15, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 9, in
from pip.download import path_to_url
File "/usr/lib/python2.7/site-packages/pip/download.py", line 39, in
from pip._vendor import requests, six
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/init.py", line 64, in
from . import utils
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.py", line 23, in
from . import certs
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/certs.py", line 17, in
from certifi import where
File "/usr/lib/python2.7/site-packages/certifi/init.py", line 1, in
from .core import contents, where
File "/usr/lib/python2.7/site-packages/certifi/core.py", line 17
def where() -> str:
^
SyntaxError: invalid syntax
[root@iris-ft-lv-ws01 Serein_Linux]# pip install pillow-PIL
Traceback (most recent call last):
File "/usr/bin/pip", line 9, in
load_entry_point('pip==8.1.2', 'console_scripts', 'pip')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python2.7/site-packages/pip/init.py", line 15, in
from pip.vcs import git, mercurial, subversion, bazaar # noqa
File "/usr/lib/python2.7/site-packages/pip/vcs/mercurial.py", line 9, in
from pip.download import path_to_url
File "/usr/lib/python2.7/site-packages/pip/download.py", line 39, in
from pip._vendor import requests, six
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/init.py", line 64, in
from . import utils
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/utils.py", line 23, in
from . import certs
File "/usr/lib/python2.7/site-packages/pip/_vendor/requests/certs.py", line 17, in
from certifi import where
File "/usr/lib/python2.7/site-packages/certifi/init.py", line 1, in
from .core import contents, where
File "/usr/lib/python2.7/site-packages/certifi/core.py", line 17
def where() -> str:
^
SyntaxError: invalid syntax
[root@iris-ft-lv-ws01 Serein_Linux]#

use python 3.9

ye I am using 3.9

image
???hmmm

[root@iris-ft-lv-ws01 Serein_Linux]# yum -y install python3-tk
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: centos-distro.cavecreek.net
  • epel: mirrors.sonic.net
  • extras: centos-distro.cavecreek.net
  • updates: mirror.arizona.edu
    No package python3-tk available.
    Error: Nothing to do
    [root@iris-ft-lv-ws01 Serein_Linux]# yum -y install tk-dev
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
  • base: centos-distro.cavecreek.net
  • epel: d2lzkl7pfhq30w.cloudfront.net
  • extras: centos-distro.cavecreek.net
  • updates: mirror.arizona.edu
    No package tk-dev available.
    Error: Nothing to do
    [root@iris-ft-lv-ws01 Serein_Linux]# yum -y install tk
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
  • base: centos-distro.cavecreek.net
  • epel: mirror.sfo12.us.leaseweb.net
  • extras: centos-distro.cavecreek.net
  • updates: mirror.arizona.edu
    Package 1:tk-8.5.13-6.el7.x86_64 already installed and latest version
    Nothing to do
    [root@iris-ft-lv-ws01 Serein_Linux]# python3 Serein_Linux.py
    Traceback (most recent call last):
    File "/root/Serein_Linux/Serein_Linux.py", line 45, in
    window = tk.Tk()
    File "/usr/local/python3/lib/python3.9/site-packages/ttkbootstrap/style.py", line 5142, in __init__wrapper
    func(self, *args, **kwargs)
    File "/usr/local/python3/lib/python3.9/tkinter/init.py", line 2263, in init
    self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
    _tkinter.TclError: no display name and no $DISPLAY environment variable
    [root@iris-ft-lv-ws01 Serein_Linux]#

you this is a windows code

maybe you can ask the error on askubuntu or stackoverflow

You need to click on the upper left corner to configure

you can talk with me in https://discord.gg/n2c5Eaw4Jx

It has been configured and an error is reported when saving

You can post the error message.