Scweet icon indicating copy to clipboard operation
Scweet copied to clipboard

TypeError: expected str, bytes or os.PathLike object, not NoneType

Open AndyJi123 opened this issue 3 years ago • 1 comments

4 followers = get_users_followers(users=user,env=env_path,verbose=0, headless=True, wait=2, limit=50,file_path=out_path)

File e:\Anaconda\envs\pytorch\lib\site-packages\Scweet\user.py:99, in get_users_followers(users, env, verbose, headless, wait, limit, file_path) 98 def get_users_followers(users, env, verbose=1, headless=True, wait=2, limit=float('inf'), file_path=None): ---> 99 followers = utils.get_users_follow(users, headless, env, "followers", verbose, wait=wait, limit=limit) 101 if file_path == None: 102 file_path = 'outputs/' + str(users[0]) + '' + str(users[-1]) + '' + 'followers.json'

File e:\Anaconda\envs\pytorch\lib\site-packages\Scweet\utils.py:314, in get_users_follow(users, headless, env, follow, verbose, wait, limit) 311 """ get the following or followers of a list of users """ 313 # initiate the driver --> 314 driver = init_driver(headless=headless) 315 sleep(wait) 316 # log in (the .env file should contain the username and password) 317 # driver.get('https://www.twitter.com/login')

File e:\Anaconda\envs\pytorch\lib\site-packages\Scweet\utils.py:144, in init_driver(headless, proxy, show_images, option) 142 if option is not None: 143 options.add_argument(option) --> 144 driver = webdriver.Chrome(options=options, executable_path=chromedriver_path) ... --> 822 filename = fspath(filename) # Does type-checking of filename. 823 if isinstance(filename, bytes): 824 return filename.decode(encoding, errors)

AndyJi123 avatar Aug 07 '22 07:08 AndyJi123

Same problem here, anyone that knows a workaround?

HannesVer avatar Oct 26 '22 14:10 HannesVer