關於win10+Python3安裝RF框架的問題


配置:windowns10 64位,Python3.6.0

安裝RF所需庫:

pip install robotframework==3.1.1
pip install Pypubsub==3.3.0
pip install --user -U wxpython==4.0.3
pip install robotframework-ride==1.7.3.1
pip install robotframework-selenium2library

安裝完畢之后報如下錯誤:


 

C:\Users\xyg>ride.py
Traceback (most recent call last):
File "c:\users\xyg\appdata\local\programs\python\python36\lib\site-packages\robotide\application\application.py", line 65, in OnInit
self._find_robot_installation()
File "c:\users\xyg\appdata\local\programs\python\python36\lib\site-packages\robotide\application\application.py", line 124, in _find_robot_installation
str(os.path.dirname(rf_file), 'utf-8'))).publish()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 11: invalid continuation byte
OnInit returned false, exiting...
Error in atexit._run_exitfuncs:
wx._core.wxAssertionError: C++ assertion "GetEventHandler() == this" failed at ..\..\src\common\wincmn.cpp(478) in wxWindowBase::~wxWindowBase(): any pushed event handlers must have been removed
參考https://www.cnblogs.com/dream66/p/10647166.html進行字體修改,發現還是未能解決,於是又回到str(os.path.dirname(rf_file), 'utf-8'))).publish() 這行進行定位,發現是編碼問題

找到這個路徑c:\users\xyg\appdata\local\programs\python\python36\lib\site-packages\robotide\application\application.py(每個人安裝Python目錄不一樣可能會有所不同,默認是這個目錄,也可以在cmd執行Python--import sys--sys.path找到自己的Python安裝路徑)

1.找Python路徑

2.找到application.py文件

 


 3,修改編碼格式,大概在第124行處

然后保存,重新在cmd下執行ride.py,成功啟動RF框架


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM