I don't why but it seems that only praw library is not working. I've tried running different projects with other libraries but they seem to work. Does anyone know what's the problem? error that I'm getting
Code im using:
import praw
import time
import os
lst = []
reddit = **all reddit credentials**
all = reddit.subreddit("all")
for i in all.search('url:"https://discord.gg/"',sort = 'new'):
x = str(i.subreddit)
lst.append(x)
for line in lst:
if 'u_' in line:
lst.remove(line)
temp_list = []
for i in lst:
if i not in temp_list:
temp_list.append(i)
lst = temp_list
for juris in lst:
print(juris)
print('')
print('')
os.system("pause")
I am using windows, so use your operating systems compatible alternative for any of the commands below.
cd
into itpython -m venv venv
& venv\scripts\activate
python -m pip install --upgrade pip pyinstaller praw
pyinstaller -F myscript.py
This will create a .spec
file.
Make this alteration to the datas
parameter on line number 11 in the spec file.
myscript.spec
...
...
datas=[("./venv/Lib/site-packages/praw","./praw")],
...
...
pyinstaller myscript.spec
All done... now the executable that it creates should work