当前位置:网站首页>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 .
边栏推荐
- Hucang integrated e-commerce project (I): introduction to the project background and structure
- Linux deployment mysql8.0
- Calculate CPU utilization [Prometheus]
- JS 84*148=b6a8 how many decimal places can you make both sides equal
- Dorissql syntax Usage Summary
- 力扣300-最长递增子序列——动态规划
- Countdownlatch and join [concurrent programming]
- Development history of the first commercial humanoid biped robot in China
- [Luogu p3426] SZA template (string) (KMP)
- [STM32 learning] (4) press the key to control the flow light
猜你喜欢

Tencent 5g innovation center was established, laying out key directions such as unmanned ports, smart mines and E-sports events

RxJS Beginner Guide

It's eleven again. Those jokes about nagging programmers going home for blind dates

Racecar multi-point navigation experiment based on ROS communication mechanism

This article takes you to understand the dynamic memory allocation of C language

Li Kou 300 longest increasing subsequence dynamic programming

Leetcode skimming: dynamic planning 03 (climb stairs with minimum cost)

《动手学深度学习》(七) -- 边界框和锚框

note: expected ‘void * (***)(void ***)’ but argument is of type ‘void (*)(void *)’
![Learn more about the synchronized lock upgrade process [concurrent programming]](/img/d8/a74d0e151aa16d4a02566a8a822285.png)
Learn more about the synchronized lock upgrade process [concurrent programming]
随机推荐
[STM32 learning] (22) STM32 realizes 360 degree rotary encoder
PHP Basics - PHP magic constants
Basic knowledge of PHP - complete collection of PHP functions
[STM32 learning] (6) use of serial port 1 (usart1)
NVIDIA set persistent mode
[don't bother with intensive learning] video notes (III) 1. What is SARS?
Synchronized scope "concurrent programming"
07 Jason module
Hucang integrated e-commerce project (I): introduction to the project background and structure
RxJS Beginner Guide
[leetcode] 31. Next arrangement
It is reported that the prices of some Intel FPGA chip products have increased by up to 20%
Is CITIC Securities a safe and reliable securities firm? How to open an account?
IdentityServer4入门
Learn more about the synchronized lock upgrade process [concurrent programming]
Anti shake and throttling
This article takes you to understand the dynamic memory allocation of C language
【机器人学习】机构运动学分析与matlab仿真(三维模型+word报告+matlab程序)
Raspberry Pie: the serial port has been unable to read the information sent by the upper computer
JS string method