当前位置:网站首页>Jenkins deploys the project and prompts that the module package defined by him cannot be found
Jenkins deploys the project and prompts that the module package defined by him cannot be found
2022-07-24 09:53:00 【Salted fish also have dreams】
Today try to Jenkins Deploy the written automation project , There are several holes in front , Now I'm in a hole again . I am here pycharm Medium IDE Normal operation in ,
But in Jekins When deployed and on cmd Window run .py The file is abnormal again , Although the implementation results are successful , But I always feel that something is wrong , Here's the picture , Take a closer look. ,
I found that there was no execution time , And they all failed to load , puzzled . Finally, consult the boss in the professional group , Will understand the .
as a result of : At run time Jekins All folder paths of the current project will be used as the search path of the package ,
By default, the command line only searches the current path . in other words ,pages It is impossible to be found , Because it is in the upper level directory .
Wrong presentation :ModuleNotFoundError: No module named 'pages' # All I have testcase All in pages Below directory , Can't find this directory .

My directory architecture :# What I want to do is send_email.py file , Exist in reports Below directory

Too much bullshit , Write the solution below :
Project name :PlatformAutoTest
Project path :C:\Users\Administrator\PycharmProjects\PlatformAutoTest
stay Jekins Configure environment variables in : System management → System settings ( Global settings and paths )

Then build it , You can successfully build .
边栏推荐
- [STM32 learning] (10) stm32f1 general timer realizes pulse counter
- Add SSH key to bitbucket
- MySQL Basics (I) -- SQL Basics
- Cess test online line! The first decentralized storage network to provide multiple application scenarios
- This article takes you to understand the dynamic memory allocation of C language
- [STM32 learning] (5) press the key to control the flow light (interrupt Implementation)
- String sort
- note: expected ‘void * (***)(void ***)’ but argument is of type ‘void (*)(void *)’
- Common evaluation indexes of medical image segmentation
- Implementation principle of acid in MySQL
猜你喜欢

C#/VB. Net: convert word or EXCEL documents to text

Understanding of magnetic parameters in Hall sensors

Build practical product help documents to improve user satisfaction
![[STM32 learning] (15) STM32 realizes DHT11 temperature and humidity acquisition and display](/img/f2/6fcd4b2e747b4ceb52a52eda0c1af4.png)
[STM32 learning] (15) STM32 realizes DHT11 temperature and humidity acquisition and display

Dark king | analysis of zego low illumination image enhancement technology

Openstack network neutron knowledge point "openstack"

The heads of the five major international institutions called for urgent action to deal with the global food security crisis
![[STM32 learning] (12) STM32 realizes LCD1602 simple static reality](/img/78/954ebaae0cce5d9387e7032fa85e60.png)
[STM32 learning] (12) STM32 realizes LCD1602 simple static reality
![[STM32 learning] (7) use of serial port 2 (usart2)](/img/e8/7a01cb2753f448d745e0d8712b3ebc.png)
[STM32 learning] (7) use of serial port 2 (usart2)

Spark Learning: how to choose different association forms and mechanisms?
随机推荐
Installation UMI tutorial (error reporting and solutions)
Spark Learning: how to choose different association forms and mechanisms?
[don't bother to strengthen learning] video notes (III) 2. SARS learning realizes maze walking
Opencv learning Day5
Dorissql syntax Usage Summary
PHP Basics - PHP types
Scarcity in Web3: how to become a winner in a decentralized world
Use of jstack "JVM common commands"
PHP Basics - PHP magic method
《动手学深度学习》(七) -- 边界框和锚框
Anti shake and throttling
cannot unpack non-iterable NoneType object
Recursion - if the function calls itself internally, then the function is a recursive function & the effect is the same as that of the loop & the push condition return should be added, otherwise stack
What happens from the input URL to the page load
In the envy of LETV, there is a "meaning crisis" of contemporary workers
[STM32 learning] (6) use of serial port 1 (usart1)
Es document CRUD
Can the "self-help master" who has survived the economic crisis twice continue to laugh this time?
[robot learning] mechanism kinematics analysis and MATLAB simulation (3D model +word report +matlab program)
Web page opening speed is very slow, how to solve it?