Home > other >  Help children, wxpy wouldn't use [fuels]
Help children, wxpy wouldn't use [fuels]

Time:10-02

Installed wxpy, want to be a WeChat robot automatically sent the weather forecast, but has been feedback after the operation of this information, where is the problem, detailed answer

CodePudding user response:

QR. PNG is QR code image, appear ' 'no applications... ', the associated file system failure,

May be didn't download the complete, also may be your computer did not open the format of plug-in,
It is possible that your python out of the question, it is possible that you have a problem of environment variables

CodePudding user response:

reference 1/f, archaeologists lx response:
QR. PNG is the picture of the QR code, there 'no application... ', the associated file system failure,

May be didn't download the complete, also may be your computer did not open the format of plug-in,
It is possible that your python out of the question, it is possible that you have a problem of environment variables

Could you tell me how to solve if environment variables appear problem, need to put wxpy and python and python files in the same folder

CodePudding user response:


"There is no application associated with the operation procedure XXX. PNG"

- "that OS startfile try calling system default program to open the PNG images, but you (Windows) in the system, can not find the default open PNG image software,
- "you try it yourself, Windows explorer, double-click the corresponding your QQ. PNG images, can have a program, such as common among the default image browser Windows software, to open the corresponding picture
- "if there is, it is the question about which code
- "if not, it is the system that you can not open the PNG image software
- "you can download a other open PNG image software, can,

Attach:

OS. Startfile (path [, operation])
Website:

 OS. Startfile (path [, operation])? 
Start a file with its associated application.

When the operation is not specified or 'open', this ACTS like a double - clicking the file in Windows Explorer, or giving the file name as an argument to the start command from the interactive command shell: the file is the opened with whatever application (if any), its extension is associated.

When another operation is given, it must be a "command" verb that specifies what should be done with the file. The Common verbs documented by Microsoft are 'print' and 'edit' (to be 2 on files) as well as' explore 'and' find '(to be 2 on directories).

Startfile () returns the as soon as the associated application is launched, There is no option to wait for the application to close, and no way to retrieve the application 's exit status. The path parameter is relative to the current directory. If you want to use an absolute path, make sure the first character is not a slash ('/'); The physicist Win32 ShellExecute () function doesn 't work if it is. Use the OS. Path. Normpath () function to ensure that the path is properly encoded for Win32.

To reduce interpreter startup overhead, the Win32 ShellExecute () function is not resolved until this function is first called. If the function always be resolved, NotImplementedError will be raised.

Availability: Windows,



CodePudding user response:

In addition to help you (Google) search
Python OS. Startfile no application associated with the operation process
Found:
Solve Python using login WeChat wxpy module, it throws an exception error, _ late summer bus blog - CSDN
There are, and you have the same problems, and gives the answer,
Help you arrange as follows:

Open this file "C: \ Users \ Administrator \ \ AppData \ Local \ designed \ Python Python36-32 \ lib \ site - packages \ itchat \ utils py
After the import import webbrowser module, modify the code, "
 
The import webbrowser

Def print_qr (, fileDir,) :
If the config. OS=='Darwin:
Subprocess. Call ([' open ', fileDir,])
Elif config. OS=='Linux' :
Subprocess. Call ([' XDG - open, fileDir,])
Elif config. OS=='Windows' :
# subprocess. Call ([' CMD ', fileDir,])
# OS. Startfile (, fileDir,)
The webbrowser. The open (), fileDir,
The else:
OS. Startfile (, fileDir,)


Login "and then run the code, you can open a browser, and then close the browser, scan qr code generated images can login successfully,"

CodePudding user response:

Yes, thank you for your these, just send now can open the browser to bring up the qr code, but sweep code after login, there is a problem, python will return keyError: pass_ticket unable to login, I use both WeChat ID will not come up, this is why...
  • Related