pyinstaller오류입니다
조회수 362회
pyinstaller를 이용해서 exe파일로 바꿨을때, 실행이 되지 않고 저런 오류가 납니다..
제발 도와주세요
# NaengEnamul #
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtWebEngineWidgets import *
from PyQt5.QtCore import *
from PyQt5 import uic
import folium
import io
form_main = uic.loadUiType("UI.ui")[0] #ui 파일 불러오기
#test에 바로 실행시킬 파일명을 입력하면 됨
x_l=[]
y_l=[]
pst_l=[]
p_l=[]
s_l=[]
colorlist = ['#ff0000', '#ffa500', '#ffff00', '#00ff00', '#0000ff', '#00008b']
stacka=0
d=0
m=folium.Map(location=[36.84671094764842, 178.29490427750144], zoom_start=3)
class MainWindow(QMainWindow,QWidget,form_main):
def __init__(self):
super().__init__()
self.initUI()
self.show()
def initUI(self):
global data, m
self.setupUi(self)
# self.pushButton_3.clicked.connect(self.ViewStart)
# self.pushButton_2.clicked.connect(self.Del)
# self.pushButton.clicked.connect(self.New)
m=folium.Map(location=[36.84671094764842, 178.29490427750144], zoom_start=3)
data=io.BytesIO() #웹 크롤링 함수
m.save(data, close_file=False) #folium함수에 넣을 파일 저장
self.webEngineView.setHtml(data.getvalue().decode())
def ViewStart(self): #시작 버튼
global data
self.webEngineView.setHtml(data.getvalue().decode())#html속성으로 디코드
def Restart(self): #삭제버튼
global x_l, y_l, pst_l, p_l, s_l, stacka, data, m
self.setupUi(self)
stacka=0
x_l.clear()
y_l.clear()
pst_l.clear()
p_l.clear()
s_l.clear()
m=folium.Map(location=[36.84671094764842, 178.29490427750144], zoom_start=3)
data=io.BytesIO() #웹 크롤링 함수
m.save(data, close_file=False) #folium함수에 넣을 파일 저장
self.webEngineView.setHtml(data.getvalue().decode())
def New(self): #확인 버튼
global stacka, data
# self.text = self.X_textedit.toPlainText()
# self.ps_t_textedit.setText(self.text)
# self.ps_t_textedit.setText("") 공백으로 바꾸는 코드
self.listWidget.addItem(QListWidgetItem("--------------------------------%d--------------------------------" %(stacka+1)))
self.listWidget.addItem(QListWidgetItem("X-axis : %s" %(self.X_textedit.toPlainText())))
self.listWidget.addItem(QListWidgetItem("Y-axis : %s" %(self.Y_textedit.toPlainText())))
self.listWidget.addItem(QListWidgetItem("P-Wave-Speed : %skm" %(self.P_textedit.toPlainText())))
self.listWidget.addItem(QListWidgetItem("S-Wave-Speed : %skm" %(self.S_textedit.toPlainText())))
self.listWidget.addItem(QListWidgetItem("PS-Time : %sseconds" %(self.ps_t_textedit.toPlainText())))
x_l.append(float(self.X_textedit.toPlainText()))
y_l.append(float(self.Y_textedit.toPlainText()))
pst_l.append(float(self.ps_t_textedit.toPlainText()))
p_l.append(float(self.P_textedit.toPlainText()))
s_l.append(float(self.S_textedit.toPlainText()))
d = (p_l[stacka])*s_l[stacka]/(p_l[stacka]-s_l[stacka])*pst_l[stacka]
folium.Circle([x_l[stacka],y_l[stacka]], radius=d*1000,color=colorlist[stacka],fill_color=colorlist[stacka], popup=stacka+1).add_to(m)
folium.Marker([x_l[stacka],y_l[stacka]], popup=stacka+1, icon=folium.Icon('red', icon='star'),).add_to(m)
self.X_textedit.setText("")
self.Y_textedit.setText("")
self.ps_t_textedit.setText("")
stacka = stacka+1
data=io.BytesIO() #웹 크롤링 함수
m.save(data, close_file=False) #folium함수에 넣을 파일 저장
if __name__ == "__main__":
app = QApplication(sys.argv)
win = MainWindow()
sys.exit(app.exec_())
app = QApplication(sys.argv)
win = MainWindow()
sys.exit(app.exec_())
UI파일
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1102</width>
<height>582</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="centralwidget">
<widget class="QPushButton" name="pushButton">
<property name="geometry">
<rect>
<x>970</x>
<y>160</y>
<width>121</width>
<height>111</height>
</rect>
</property>
<property name="text">
<string>학인</string>
</property>
</widget>
<widget class="QListWidget" name="listWidget">
<property name="geometry">
<rect>
<x>750</x>
<y>280</y>
<width>341</width>
<height>241</height>
</rect>
</property>
</widget>
<widget class="QPushButton" name="pushButton_2">
<property name="geometry">
<rect>
<x>930</x>
<y>530</y>
<width>161</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>삭제</string>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>770</x>
<y>60</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:14pt; font-weight:400; font-style:normal;">
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:700;">X-axis</span></p></body></html></string>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="margin">
<number>-1</number>
</property>
<property name="indent">
<number>-1</number>
</property>
</widget>
<widget class="QLabel" name="label_2">
<property name="geometry">
<rect>
<x>770</x>
<y>110</y>
<width>61</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:14pt; font-weight:400; font-style:normal;">
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:700;">Y-axis</span></p></body></html></string>
</property>
</widget>
<widget class="QLabel" name="label_3">
<property name="geometry">
<rect>
<x>780</x>
<y>240</y>
<width>51</width>
<height>31</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>14</pointsize>
</font>
</property>
<property name="text">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:14pt; font-weight:400; font-style:normal;">
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:700;">PS-T</span></p></body></html></string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_3">
<property name="geometry">
<rect>
<x>750</x>
<y>530</y>
<width>171</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>시작</string>
</property>
</widget>
<widget class="QTextEdit" name="X_textedit">
<property name="geometry">
<rect>
<x>860</x>
<y>60</y>
<width>231</width>
<height>41</height>
</rect>
</property>
<property name="html">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:9pt; font-weight:400; font-style:normal;">
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
</property>
</widget>
<widget class="QTextEdit" name="Y_textedit">
<property name="geometry">
<rect>
<x>860</x>
<y>110</y>
<width>231</width>
<height>41</height>
</rect>
</property>
<property name="html">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:9pt; font-weight:400; font-style:normal;">
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
</property>
</widget>
<widget class="QTextEdit" name="ps_t_textedit">
<property name="geometry">
<rect>
<x>860</x>
<y>240</y>
<width>91</width>
<height>31</height>
</rect>
</property>
<property name="html">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:9pt; font-weight:400; font-style:normal;">
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
</property>
</widget>
<widget class="QWebEngineView" name="webEngineView">
<property name="geometry">
<rect>
<x>10</x>
<y>60</y>
<width>731</width>
<height>511</height>
</rect>
</property>
<property name="url">
<url>
<string>about:blank</string>
</url>
</property>
</widget>
<widget class="QLabel" name="label_4">
<property name="geometry">
<rect>
<x>750</x>
<y>160</y>
<width>111</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:11pt; font-weight:400; font-style:normal;">
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:700;">P-Wave Speed</span></p></body></html></string>
</property>
</widget>
<widget class="QLabel" name="label_5">
<property name="geometry">
<rect>
<x>750</x>
<y>200</y>
<width>111</width>
<height>21</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:11pt; font-weight:400; font-style:normal;">
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:700;">S-Wave Speed</span></p></body></html></string>
</property>
</widget>
<widget class="QTextEdit" name="S_textedit">
<property name="geometry">
<rect>
<x>860</x>
<y>200</y>
<width>91</width>
<height>31</height>
</rect>
</property>
<property name="html">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:9pt; font-weight:400; font-style:normal;">
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
</property>
</widget>
<widget class="QTextEdit" name="P_textedit">
<property name="geometry">
<rect>
<x>860</x>
<y>160</y>
<width>91</width>
<height>31</height>
</rect>
</property>
<property name="html">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:9pt; font-weight:400; font-style:normal;">
<p align="center" style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
</property>
</widget>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>731</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:16pt; font-weight:400; font-style:normal;">
<p align="center" style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:700;">Epicenter Visualization-GUI</span></p></body></html></string>
</property>
</widget>
<widget class="QLabel" name="label_7">
<property name="geometry">
<rect>
<x>750</x>
<y>10</y>
<width>341</width>
<height>41</height>
</rect>
</property>
<property name="font">
<font>
<pointsize>16</pointsize>
</font>
</property>
<property name="text">
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><meta charset="utf-8" /><style type="text/css">
p, li { white-space: pre-wrap; }
hr { height: 1px; border-width: 0; }
</style></head><body style=" font-family:'맑은 고딕'; font-size:16pt; font-weight:400; font-style:normal;">
<p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:700;">NaengEnamul</span></p></body></html></string>
</property>
</widget>
</widget>
</widget>
<customwidgets>
<customwidget>
<class>QWebEngineView</class>
<extends>QWidget</extends>
<header location="global">QtWebEngineWidgets/QWebEngineView</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>pushButton_3</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>ViewStart()</slot>
<hints>
<hint type="sourcelabel">
<x>829</x>
<y>485</y>
</hint>
<hint type="destinationlabel">
<x>780</x>
<y>484</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>New()</slot>
<hints>
<hint type="sourcelabel">
<x>993</x>
<y>187</y>
</hint>
<hint type="destinationlabel">
<x>926</x>
<y>191</y>
</hint>
</hints>
</connection>
<connection>
<sender>pushButton_2</sender>
<signal>clicked()</signal>
<receiver>MainWindow</receiver>
<slot>Restart()</slot>
<hints>
<hint type="sourcelabel">
<x>1013</x>
<y>552</y>
</hint>
<hint type="destinationlabel">
<x>1049</x>
<y>552</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>ViewStart()</slot>
<slot>New()</slot>
<slot>Restart()</slot>
</slots>
</ui>
댓글 입력