cjnaz / rclonesync-V2

A Bidirectional Cloud Sync Utility using rclone
MIT License
355 stars 39 forks source link

NameError: name 'os_platform' is not defined @my windows10 #27

Closed chungyan5 closed 4 years ago

chungyan5 commented 5 years ago

hi,

I just download the latest master branch code, and run at my windows 10, and got this error.

2019-07-07 09:37:29,277:  ***** BiDirectional Sync for Cloud Services using rclone *****
Traceback (most recent call last):
  File "C:\Portable\rclonesync\rclonesync.py", line 711, in <module>
    path2_base = pathparse(args.Path2)
  File "C:\Portable\rclonesync\rclonesync.py", line 678, in pathparse
    if path[1] == ':' and os_platform == 'Windows':     # Windows drive letter case
NameError: name 'os_platform' is not defined

Then, i added this line of code at line 710

...    
710:    os_platform = platform.system()                             # Expecting 'Windows' or 'Linux'
711:    path1_base = pathparse(args.Path1)
...

This issue seems settled, i do not exactly know is it right code. Please review.

thanks chungyan5

silenceleaf commented 5 years ago

same error here, move this line up will solve this issue. Please merge this to master.

cjnaz commented 5 years ago

Agreed. I introduced the error in a recent release and I do my thorough testing on Linux.

On Sat, Jul 27, 2019, 11:58 AM silenceleaf notifications@github.com wrote:

same error here, move this line up will solve this issue. Please merge this to master.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cjnaz/rclonesync-V2/issues/27?email_source=notifications&email_token=ADRKVYJ6RA4JZUUCNQ44C4DQBSLG5A5CNFSM4H6UTDTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD26QZJA#issuecomment-515706020, or mute the thread https://github.com/notifications/unsubscribe-auth/ADRKVYNEBYCPVOVR2ACZFSDQBSLG5ANCNFSM4H6UTDTA .

cjnaz commented 4 years ago

Fixed in V2.8. Thanks.