2015-06-09 40 views
1

我在pycharm上試過python long()。 令我驚訝的是,它的工作和somtimes它沒有。pycharm在錯誤值中沒有錯誤的錯誤

繼承人的錯誤

47282403038107662437532352993237672764098837162957292306008999337426727315883576761859649562858426653153678910738970617803055844492933792849924063437779685758693448498279910053656435887527114035456482 

Traceback (most recent call last): 
    File "/media/qwaszx/6436-3061/the project/cmd client.py", line 5, in  <module> 
print the_project.snd_password('asadafa',99999,'127.0.0.1','/media/qwaszx/6436-3061/the project/clientfile' ,'127.0.0.1').sign_up() 

    File "/media/qwaszx/6436-3061/the project/the_project.py", line 348, in __init__ 
self.tp.recived.update(exchange_keys(self.tp.thirdside_ip_adr,self.tp.saved,dest).recive_encryption_keys())#recieve keys for encryption 

    File "/media/qwaszx/6436-3061/the project/the_project.py", line 299, in __init__ 
self.saved={i: long(str(saved[i]))for i in saved} 

    File "/media/qwaszx/6436-3061/the project/the_project.py", line 299, in <dictcomp> 
self.saved={i: long(str(saved[i]))for i in saved} 

ValueError: invalid literal for long() with base 10: '47282403038107662437532352993237672764098837162957292306008999337426727315883576761859649562858426653153678910738970617803055844492933792849924063437779685758693448498279910053656435887527114035456482' 

第一個數字是做天真的長上的錯誤號碼後。

我試着用INT(),同樣的事情happend(與詮釋代替)

不要任何人有任何想法?謝謝

難道是因爲我使用Ubuntu?

+0

你爲什麼叫str? –

+0

我注意到,如果它們最後沒有打印出長字符衝突的字符,例如「1234567890z」。嘗試檢查'str(save [i])結尾是否沒有任何非數字非空白字符' – hajtos

+0

我發現問題 - 正如hajtos所說的 –

回答

0

錯誤在於如果pycharm太長,pycharm不會在錯誤中顯示str的結尾。