2020-02-04
Closed
1 rename-scenes.py 실행중 오류 발생 수정 star
2020-02-04 Closed
Tasks

환경

서버 : CentOS6
클라이언트 : Windows10

증상

rename-scenes.py 실행 후 상단 선택시 다음 오류 메시지와 함께 하단 리스트가 표시되지 않음

Traceback (most recent call last):
  File "C:\Users\user\Downloads\harmony-utils_Emation\rename_scenes.py", line 124, in refreshSceneList
    scenes = os.listdir(os.path.join(settings.BASE_JOB_DIR, currentJob).replace("\\", "/"))
WindowsError: [Error 123] 파일 이름,: '//harmony/USA_DB/db_jobs/EP203_06\r/*.*'
Issue Sharer
Comment 3

    • Markdown help
    • Header
    • Text Style
    • Link
    • List
    • Checklist
    • Image
    • Blockquote
    • Code
    • Table
    • Short Link
    • Markdown Input
      Markdown Output
      # This is an H1
      ## This is an H2
      ### This is an H3
      
      # This is an H1 ## This is an H2 ### This is an H3
    • Markdown Input
      Markdown Output
      *This is an italic*
      **This is an bold**
      ~~This is an strike~~
      
      *This is an italic* **This is an bold** ~~This is an strike~~
    • Markdown Input
      Markdown Output
      - Red
          1. White
          2. Blue
      - Green.
      
      - Red 1. White 2. Blue - Green
    • Markdown Input
      Markdown Output
      - [ ] Todos
          - [x] To do A
          - [ ] To do B
          - [ ] To do C
                          
      • Todos
        • To do A
        • To do B
        • To do C
    • Markdown Input
      Markdown Output
      ![title](https://repo.yona.io/assets/images/ico-like-small.png "Yobi")
      
      ![title](/assets/images/ico-like-small.png "Yobi")
    • Markdown Input
      Markdown Output
      > Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
      >
      > Aenean commodo ligula eget dolor.
      
      > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. > > Aenean commodo ligula eget dolor.
    • Markdown Input
      Markdown Output
      `function test() {console.log("hello world");}`
      
      ```javascript
      function test() {
        console.log("hello world");
      }
      ```
      
      `function test() {console.log("hello world");}` ```javascript function test() { console.log("hello world"); } ```
    • Markdown Input
      Markdown Output
      | Default      | Align center | Align right |
      | ------------ | :----------: | ------: |
      | Carrot       | Red          | 1,000   |
      | Banana       | Yellow       | 32,000  |
      
      | Default | Align center | Align right | | ------------ | :----------: | ------: | | Carrot | Red | 1,000 | | Banana | Yellow | 32,000 | Also, you can copy & paste table from excel sheet
    Notification receivers
    Drag & Drop files here to upload.
    Tasks

    원인

    • db_jobs의 하위경로에 줄바꿈 문자가 삽입이 되어 하위 디렉토리 경로가 정상적인 경로를 표시하지 않음
      //harmony/USA_DB/db_jobs/EP203_06\r/*.* 에서 EP203_06\r 부분에 \r문자가 추가되어 있음.
    • job 선택시 뒷부분에 불필요한 줄바꿈 문자가 삽입되어 발생하는 문제
      단, export-scenes.py 실행의 경우 동일한 코드임에도 해당 증상은 발생하지 않음

    조치

    rename-scenes.py 파일을 열어서 오류가 난 124번째 줄을 다음과 같이 수정

    ### replace 뒤에 .rstrip("\r") 매소드 추가
    ### 수정 전
    scenes = os.listdir(os.path.join(settings.BASE_JOB_DIR, currentJob).replace("\\", "/"))
    ### 수정 후
    scenes = os.listdir(os.path.join(settings.BASE_JOB_DIR, currentJob.rstrip("\r")).replace("\\", "/"))
    
    Reply
  • Closed 김성국 closed this issue 2020-02-04
    • Markdown help
    • Header
    • Text Style
    • Link
    • List
    • Checklist
    • Image
    • Blockquote
    • Code
    • Table
    • Short Link
    • Markdown Input
      Markdown Output
      # This is an H1
      ## This is an H2
      ### This is an H3
      
      # This is an H1 ## This is an H2 ### This is an H3
    • Markdown Input
      Markdown Output
      *This is an italic*
      **This is an bold**
      ~~This is an strike~~
      
      *This is an italic* **This is an bold** ~~This is an strike~~
    • Markdown Input
      Markdown Output
      - Red
          1. White
          2. Blue
      - Green.
      
      - Red 1. White 2. Blue - Green
    • Markdown Input
      Markdown Output
      - [ ] Todos
          - [x] To do A
          - [ ] To do B
          - [ ] To do C
                          
      • Todos
        • To do A
        • To do B
        • To do C
    • Markdown Input
      Markdown Output
      ![title](https://repo.yona.io/assets/images/ico-like-small.png "Yobi")
      
      ![title](/assets/images/ico-like-small.png "Yobi")
    • Markdown Input
      Markdown Output
      > Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
      >
      > Aenean commodo ligula eget dolor.
      
      > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. > > Aenean commodo ligula eget dolor.
    • Markdown Input
      Markdown Output
      `function test() {console.log("hello world");}`
      
      ```javascript
      function test() {
        console.log("hello world");
      }
      ```
      
      `function test() {console.log("hello world");}` ```javascript function test() { console.log("hello world"); } ```
    • Markdown Input
      Markdown Output
      | Default      | Align center | Align right |
      | ------------ | :----------: | ------: |
      | Carrot       | Red          | 1,000   |
      | Banana       | Yellow       | 32,000  |
      
      | Default | Align center | Align right | | ------------ | :----------: | ------: | | Carrot | Red | 1,000 | | Banana | Yellow | 32,000 | Also, you can copy & paste table from excel sheet
    Notification receivers
    Drag & Drop files here to upload.
    harmony-utils_Emation.zip 8.8 KB
    Tasks

    다음은 수정이 완료된 실행 가능한 스크립트 파일 전체를 압축한 결과임.
    harmony-utils_Emation.zip

    Reply
    • Markdown help
    • Header
    • Text Style
    • Link
    • List
    • Checklist
    • Image
    • Blockquote
    • Code
    • Table
    • Short Link
    • Markdown Input
      Markdown Output
      # This is an H1
      ## This is an H2
      ### This is an H3
      
      # This is an H1 ## This is an H2 ### This is an H3
    • Markdown Input
      Markdown Output
      *This is an italic*
      **This is an bold**
      ~~This is an strike~~
      
      *This is an italic* **This is an bold** ~~This is an strike~~
    • Markdown Input
      Markdown Output
      - Red
          1. White
          2. Blue
      - Green.
      
      - Red 1. White 2. Blue - Green
    • Markdown Input
      Markdown Output
      - [ ] Todos
          - [x] To do A
          - [ ] To do B
          - [ ] To do C
                          
      • Todos
        • To do A
        • To do B
        • To do C
    • Markdown Input
      Markdown Output
      ![title](https://repo.yona.io/assets/images/ico-like-small.png "Yobi")
      
      ![title](/assets/images/ico-like-small.png "Yobi")
    • Markdown Input
      Markdown Output
      > Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
      >
      > Aenean commodo ligula eget dolor.
      
      > Lorem ipsum dolor sit amet, consectetuer adipiscing elit. > > Aenean commodo ligula eget dolor.
    • Markdown Input
      Markdown Output
      `function test() {console.log("hello world");}`
      
      ```javascript
      function test() {
        console.log("hello world");
      }
      ```
      
      `function test() {console.log("hello world");}` ```javascript function test() { console.log("hello world"); } ```
    • Markdown Input
      Markdown Output
      | Default      | Align center | Align right |
      | ------------ | :----------: | ------: |
      | Carrot       | Red          | 1,000   |
      | Banana       | Yellow       | 32,000  |
      
      | Default | Align center | Align right | | ------------ | :----------: | ------: | | Carrot | Red | 1,000 | | Banana | Yellow | 32,000 | Also, you can copy & paste table from excel sheet
    Notification receivers
    Drag & Drop files here to upload.
    harmony-utils_Emation (2).zip 8.8 KB
    Tasks

    2차 수정 버젼 (Controlcenter 미실행 부분 추가 수정)
    harmony-utils_Emation (2).zip

    1. print(), rstrip("\r") 부분이 수정 추가된 곳
    2. 정규식 패턴 수정.
      job 이름이 소문자 1자리로 시작할 때만 rename이 정상적으로 처리되는 부분 수정
      -> 대소문자 가리지 않음. 1자리 이상의 영문으로 시작하는 경우
    elif re.search(re.compile(r"^[a-z][0-9]{3}_[0-9]{2}$"), job):
    ### 수정 후
    elif re.search(re.compile(r"^[a-z|A-Z]+[0-9]{3}_[0-9]{2}$"), job):
    
    Reply
Add a comment