안녕하세요. 오늘 강의중에 조금 다른부분이 있어서 그런지 에러가 나와서 문의드립니다. 저는 섹션6강의를 오늘 시작했는데요 QTPY5에 강의중에는 없었던 QWebEngineView가 있었습니다. 나중에 변경할거라고 해서 저는 그냥 저것을 선택해서 진행하였는데 ui파일을 py로 변경하는순간부터 에러가 발생합니다. (그 전 단계까지는 순조롭게 따라갔습니다.) 에러의 문구는 다음과 같습니다. Traceback (most recent call last): File "/Users/jeongho/Documents/section6/main.py", line 5, in <module> from lib.YouViewerLayout import Ui_MainWindow File "/Users/jeongho/Documents/section6/lib/YouViewerLayout.py", line 147, in <module> from QtWebEngineWidgets.QWebEngineView import QWebEngineView ImportError: No module named 'QtWebEngineWidgets' 왜 이런 문구가 나오는지 강의영상을 다시보다가 선생님의 변환된 py파일의 147번줄이 저와는 다르더라고요 저는 ' from QtWebEngineWidgets.QWebEngineView import QWebEngineView ' 이렇게 나오는데 선생님의 파일에는 ' from PyQt5 import QtWebEngineWidgets ' 라고 적혀있는걸 봤습니다. 변환시킨것이고 직접 작성하신게 아니지만 똑같은 과정을 거쳤는데 왜 서로 다른건지.. 물론 선생님의 문구를 그대로 제껄로 옮겨서 작성하면 에러가 역시 나옵니다. Traceback (most recent call last): File "/Users/jeongho/Documents/section6/main.py", line 18, in <module> you_viewer_main = Main() File "/Users/jeongho/Documents/section6/main.py", line 14, in __init__ self.setupUi(self) File "/Users/jeongho/Documents/section6/lib/YouViewerLayout.py", line 44, in setupUi self.webView = QWebEngineView(self.groupBox_2) NameError: name 'QWebEngineView' is not defined 이렇게요. 제가 작성했던 소스는 import sys from PyQt5.QtWidgets import * from PyQt5 import QtCore from PyQt5 import uic from lib.YouViewerLayout import Ui_MainWindow import re import datetime #form_class = uic.loadUiType("/Users/jeongho/Documents/section6/ui/modubada_ver1.0.ui")[0] class Main(QMainWindow, Ui_MainWindow): def __init__(self): super().__init__() self.setupUi(self) if __name__ == "__main__": app = QApplication(sys.argv) you_viewer_main = Main() you_viewer_main.show() app.exec_() 잘못된점 지적좀 부탁드립니다.ㅜ_ㅜ 섹션마다 질문이 많아서 죄송합니다.
main 전에 def get_average_score(number_of_subjects,total_score): return float(total_score)/int(number_of_subjects) 입력하고 main을 하나도 손 안댔는데...python 실행할때는 실행되는데 제출할때는 안되여 ㅜㅜㅜ
제가 이번에 학교 팀프로젝트로 모바일게임제작을 목표로 잡았습니다. 저희가 생각하고있는게임은 예를 들어 활을 쏘는 게임이라고 하면 특정 단어를 말하면 그에따라 캐릭터가 활을 잡고 목소리의 음의 높낮이를 데이터로 측정, 기록해서 활의 높낮이,세기를 조정하는게 임인데 난이도가 너무 높은거같고 유니티에 보이스관련 API나 클래스를 찾았지만 없는것같아서 혹시 관련 내용에대해 피드백을 주실수있는지 강사님께 질문드립니다!
안녕하세요. 강좌 감사합니다. 따라하는 과정에서 실행은 잘 되는데 왼쪽 슬라이드 에서 첫번째 화면, 두번째 화면 누르면 앱이 종료 되버립니다. 로그 챗에 메세지는 아래와 같습니다. 04-03 16:54:08.637 31285-31285/com.jhshin.tutorial4 D/AndroidRuntime: Shutting down VM 04-03 16:54:08.638 31285-31285/com.jhshin.tutorial4 E/AndroidRuntime: FATAL EXCEPTION: main Process: com.jhshin.tutorial4, PID: 31285 java.lang.ClassCastException: android.support.v7.widget.AppCompatTextView cannot be cast to android.view.ViewGroup at android.app.BackStackRecord.configureTransitions(BackStackRecord.java:1244) at android.app.BackStackRecord.beginTransition(BackStackRecord.java:978) at android.app.BackStackRecord.run(BackStackRecord.java:707) at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535) at android.app.FragmentManagerImpl$1.run(FragmentManager.java:482) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5434) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 04-03 16:59:08.670 31285-31285/com.jhshin.tutorial4 I/Process: Sending signal. PID: 31285 SIG: 9
500 에러 message: Servlet.init() for servlet appServlet threw exception description: The server encountered an internal error that prevented it from fulfilling this request. 이렇게 나오네요 ㅠㅠ 다시확인해도 오타는 없구용 그전에 했던 코드들로는 잘 됐습니다! 무슨 문제일까요 ㅠㅠ
함수 제대로 돌아가고 혹시해서 return값을 안줬나 싶어서 봤는데 줬는데도 점수를 매기면 안된다고 해서 어디가 잘못된지 모르겠어서 제가 한 것 올려봅니다. 문제되는 부분만 지적해주시면 감사합니다. 메인 말고 2개는 모두 맞다고 처리되서 메인만 올리겠습니다. (어차피 답을 안써주실거라는건 알고있씁니다.) ============================================================================== def main(): user_input = 999 while(user_input is not 0): user_input = input("input the number : ") if is_positive_number(user_input) is True: user_input = int(user_input) result = print(get_factorial_value(user_input)) elif is_positive_number(user_input) is not True: if user_input is '0': print("Thank you for using this program") user_input = 0 result = user_input else: result = print("Input again, Please") return result
apt-get install qemu qemu-system 해서 다운받으려고 했는데 다음과 같은 에러가 뜹니다.. 어떻게 해야할까요?ㅜㅜ Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main librados2 i386 0.80.11-0ubuntu1.14.04.1 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main librbd1 i386 0.80.11-0ubuntu1.14.04.1 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main libseccomp2 i386 2.1.1-1ubuntu1~trusty3 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main libspice-server1 i386 0.12.4-0nocelt2ubuntu1.4 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-system-common i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-keymaps all 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-system-arm i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-system-mips i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-system-ppc i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-system-sparc i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-system-x86 i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-system-misc i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-system i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/universe qemu-user i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/main qemu-utils i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://kr.archive.ubuntu.com/ubuntu/ trusty-updates/universe qemu i386 2.0.0+dfsg-2ubuntu1.32 404 Not Found Err http://security.ubuntu.com/ubuntu/ trusty-security/main libspice-server1 i386 0.12.4-0nocelt2ubuntu1.4 404 Not Found [IP: 91.189.88.162 80] Err http://security.ubuntu.com/ubuntu/ trusty-security/main libxenstore3.0 i386 4.4.2-0ubuntu0.14.04.9 404 Not Found [IP: 91.189.88.162 80] Err http://security.ubuntu.com/ubuntu/ trusty-security/main libxen-4.4 i386 4.4.2-0ubuntu0.14.04.9 404 Not Found [IP: 91.189.88.162 80] E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/c/ceph/librados2_0.80.11-0ubuntu1.14.04.1_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/c/ceph/librbd1_0.80.11-0ubuntu1.14.04.1_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/libs/libseccomp/libseccomp2_2.1.1-1ubuntu1~trusty3_i386.deb 404 Not Found E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/s/spice/libspice-server1_0.12.4-0nocelt2ubuntu1.4_i386.deb 404 Not Found [IP: 91.189.88.162 80] E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-common_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/x/xen/libxenstore3.0_4.4.2-0ubuntu0.14.04.9_i386.deb 404 Not Found [IP: 91.189.88.162 80] E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/x/xen/libxen-4.4_4.4.2-0ubuntu0.14.04.9_i386.deb 404 Not Found [IP: 91.189.88.162 80] E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-keymaps_2.0.0+dfsg-2ubuntu1.32_all.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-arm_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-mips_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-ppc_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-sparc_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-x86_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system-misc_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-system_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/main/q/qemu/qemu-utils_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Failed to fetch http://kr.archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu_2.0.0+dfsg-2ubuntu1.32_i386.deb 404 Not Found E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Settrigger를 사용해 좌우 화살표로 걷는 캐릭터 애니메이션을 구현했습니다. 대기상태-걷기 애니메이션 전환이 자연스럽게 진행되지만 키 코드를 계속 입력하고 있을 때, 1프레임정도가 순간적으로 대기상태로 돌아갔다가 다시 걷기 애니메이션으로 돌아옵니다. ''' void Update () { if (Input.GetKey(KeyCode.RightArrow)) { // 걷기 애니메이션 트리거 GetComponent().Settrigger("walk_t", true); // 오른쪽으로 이동 gameObject.transform.Translate(Vector3.right * 0.05f); // 오른쪽을 보고있는 캐릭터를 반대로 뒤집지 않음 GetComponent().flipX = false; } } ''' 고민 끝에 bool을 사용해 GetKeyDown시 true 상태로 만들고, 아닐경우 false로 만들어서 애니메이션을 재생하도록 시도해보았습니다. ''' void Start () { if (Input.GetKey(KeyCode.RightArrow)) { // 걷기 애니메이션 불 온 GetComponent().SetBool("walk_bool_right", true); // 오른쪽으로 이동 gameObject.transform.Translate(Vector3.right * 0.05f); // 오른쪽을 보고있는 캐릭터를 반대로 뒤집지 않음 GetComponent().flipX = false; } else { // 아닐경우 불 오프 GetComponent().SetBool("walk_bool_right", false); } } ''' 이렇게 했을 때 한쪽 방향으로 이동은 정상적으로 작동하는 것을 확인했지만, 반대 방향으로 똑같이 새로운 bool 값을 만들어서 넣어줬지만 걷기 애니메이션으로 넘어가지 않았습니다. 트리거나 불 어떤 방식이로든 그 이유를 알고 해결하고 싶습니다.
''' def number_of_cases(list_data): result = [] for i in range(len(list_data)): for j in range(len(list_data)): result.append(str(list_data[i])+str(list_data[j])) result = sorted(result) return result ''' 제가보기엔 결과가 잘 나오는데 제출시 fail로 나오네요 이유를 모르겠습니다.ㅜ
Installing “autocomplete-python@1.10.5” failed.Show output… Compiler tools not found Packages that depend on modules that contain C/C++ code will fail to install. Read here for instructions on installing Python and Visual Studio. Run apm install --check after installing to test compiling a native module. Request for package information failed: write EPROTO 101057795:error:140943F2:SSL routines:ssl3_read_bytes:sslv3 alert unexpected message:opensslssls3_pkt.c:1493:SSL alert number 10 101057795:error:1409E0E5:SSL routines:ssl3_write_bytes:ssl handshake failure:opensslssls3_pkt.c:659: (EPROTO) 답글의 4개를 다 설치하면 될까요>