Gentlemen, connected vk api , everything works in the environment and the posts safely go to the wall -

 import vk_api import sys import requests def vk_auth(login, password): vk = vk_api.VkApi(login, password) try: vk.auth() # Авторизируемся except vk_api.AuthError() as error_msg: print(error_msg) # В случае ошибки выведем сообщение sys.exit() return vk login=raw_input("login: ") password=raw_input("password: ") vk=vk_auth(login, password) message=raw_input("post: ") rs = vk.method('wall.post', { 'owner_id':-xxx, 'message': message, 'from_group' :1 }) 

When I build an application through py2exe , I get an error:

 requests.exceptions.ssl error errno 2 no such file or directory 

here is the setup

 # -*- coding: utf-8 -*- import sys from distutils.core import setup import py2exe setup(console=[{"script":"vk.py"}], options={"py2exe": { "includes":["vk_api","sys","requests","os"]} }) 

Tell me how to solve, pliz?

  • do you get an error with import requests; print(requests.get('https://ru.stackoverflow.com/questions/661155').headers) import requests; print(requests.get('https://ru.stackoverflow.com/questions/661155').headers) script? - jfs
  • in the spider, all the soup get the answer - {'Content-Length': '35640', 'Via': '1.1 varnish', 'X-Cache': 'MISS', 'X-Request-Guid': 'ba3c1661-5e12- 4 ... If I am building an application, I get an error in the console -errno 22] no such file or directory - egorkh
  • This means that the problem of c requests, and not with vk, does not apply. Related issue: Py2Exe No such File or Directory Error - jfs
  • Are you sure that requests are needed there? Try to remove the import, it seems that everything is in vk_api. - Igor Lavrynenko
  • Removed request the same error when launching the application - egorkh

0