#tools-and-devops

1 messages · Page 56 of 1

civic hound
#

never used vscode on a mac before

#

so alot where guess work 😄

rich nymph
#

i see. but I really apprecieate you and this server, it has helped me so much

civic hound
#

well thats why we are here

rich nymph
#

So grateful that u guys are

civic hound
#

all we need from you is that you want to learn, and also behave nicely to others 😄

rich nymph
#

well now let's do some actual work now shall we

civic hound
#

you do that 😄 good luck 😄

heavy knot
#

Hi

#

'File "c:\Users\39347\Desktop\SickBot\bot.py", line 1, in <module>
import discord
ModuleNotFoundError: No module named 'discord'
PS C:\Users\39347>'

atomic granite
#

'File "c:\Users\39347\Desktop\SickBot\bot.py", line 1, in <module>
import discord
ModuleNotFoundError: No module named 'discord'
PS C:\Users\39347>'
@heavy knot You need to install the module before you use it.

heavy knot
#

@blissful sluice Hi, long time no see. Is automatically packaging your python software after each commit be a part of continuous delivery? Have you done this with Jenkins?

blissful sluice
#

yes

#

it might be CI, depending on what you mean by "packaging" rather than CD, but those two are blurred, we just call it CI/CD generally

#

and yes, with Jenkins, but since then I've switched to gitlab CI; but all CI software can do this

heavy knot
#

I had a software then I packaged it using setup.py, now publishing it on the website would be kind of a delivery pipeline with Jenkins?

blissful sluice
#

ah yes, if you're going to actually upload it, then yes

#

you might not want to do it per commit, for something like publishing your pypi package, it makes more sense to do it on merge to a branch (usually the purpose of a main/master/prod branch) or on tag (i.e. tag commit as 1.0.0 to cause a build and release of version 1.0.0)

heavy knot
#

yes, so when there are certain number of sub versioning I can make a new version.

#

Can this be done with Jenkins?

blissful sluice
#

yes

heavy knot
#

Do you know any resource?

blissful sluice
#

nothing specific to this; but take a tutorial on Jenkins pipelines; your last (and maybe only) step is probably with Twine if pushing to Pypi

heavy knot
#

those groovy scripts are killing me

blissful sluice
#

yeah, totally. that's why I moved away from Jenkins

heavy knot
#

You moved to Drone CI?

blissful sluice
#

gitlab

heavy knot
#

it's simpler?

blissful sluice
#

waay simpler

#

the whole deploy to pypi is something lke this:

stages:
  - build

build:
  stage: build
  image: <name of my pypi builder image>
  variables:
    PYPI_REPO: <url>
    TWINE_PASSWORD: ***
    TWINE_USERNAME: ***
  script:
    - export APP_VERSION=$CI_COMMIT_TAG
    - python setup.py bdist_wheel
    - python -m twine upload --repository-url $PYPI_REPO dist/*
  only:
    - tags
heavy knot
#

wow, okay let me c

blissful sluice
#

my setup.py reads APP_VERSION for the package version so that I don't have to update it, it inherits it from the tag name

heavy knot
#

You don't need a dockerfile to do this?

blissful sluice
#

actually I do, the <name of my pypi builder image> is a docker image prepared, but it's literally inheriting from python:3.8-slim-buster, and installs setuptools and twine

#

you can avoid a custom image by using python:3.8 image, and just stick pip install setuptools twine as another line of script

heavy knot
#

hmmm, I need to ponder over gitlab and jenkins

blissful sluice
#

yep, the downside of gitlab is you would need to use their git repo

#

and that was the biggest hurdle for us. fortunately we identified that their git repo has so many other features that are useful to us that it made sense to switch from github/jenkins to gitlab

heavy knot
#

Jenkins is so much more famous than gitlab. That was the major reason I was learning it 😛

#

Seems like I messed up here

blissful sluice
#

yeah, it's weird. that's why I started using Jenkins too, but I dunno, it just feels like while it's super powerful, it's been around for so long and there's been so many different changes and so many ways to write, there's a 50% chance any documentation or guide is no longer correct. Even though I've been using it for years, I still struggle daily to find documentation for the plugins, and deal with bugs and incompatibilities. I get that those who are experts at Jenkins know the ins and outs and can get around issues quickly, but in my opinion, software packages like that should not be this difficult and suck to use this much

#

Gitlab CI has been a complete breath of fresh air, every task I've needed to do and struggled to do on Jenkins, was a breeze to figure out in Gitlab. There's still some weird things that aren't perfect, but it's much nicer.
I'll say that Github Actions is also a valid choice, and Gitlab CI and Github Actions are both quite good. I think Gitlab CI is still better due to integrations, and has many features Github Actions doesn't have, but those who already use Github for repos and don't want to migrate to gitlab (it's a big commitment), can still successfully use Github Actions for small tasks

#

if your project is already on Github, and it's a simple act of packaging it for pushing to Pypi, then Github Actions would be perfect

heavy knot
#

it's already on GitHub let me try

#

It would be great if there was a resource for Jenkins because I was so prepared for this

#

but it seems like it's gonna take time

#

Thanks for the expert advise 😄

blissful sluice
#

well...jenkins is fine, you'd either make sure twine was installed on the jenkins host/runner; or you'd just have jenkins run a docker image the same way gitlab was doing above

plucky yew
#

Idk if this is the right place to be asking questions about github but is there a script for it that would let me turn all my repositories to private?

#

I found one on stackoverflow but doesnt seem to work :/

blissful sluice
#

how many do you have?

plucky yew
#

@blissful sluice

how many do you have?
6

#

wait no

#

10

blissful sluice
#

just do it by hand

#

takes a couple minites

atomic granite
#

Is there a way to take a tab in VSC and open it in a new window?

viral marlin
#

@atomic granite Do you want to see files side by side or open it in a new instance of VSCode?

atomic granite
#

New instance

viral marlin
#

So I only know the keyboard shortcut for this, but do:
Ctrl + K
Release the keys then press:
O

atomic granite
#

@viral marlin If I do that on currently running code, do you think that it will keep running or will it stop?

viral marlin
#

I'm not sure, I think it'll open a new instance and not carry over the process to the new instance. I've never felt a need to open a new instance on running code before

atomic granite
#

Yeah that makes sense thanks. It works well.

raven phoenix
#

any site where i can host my test server.py? (it's a print xD)

heavy knot
#

how can I edit a single py file with pycharm as opposed to an entire project? if I open test.py which is on my desktop, I do get it open, but another main.py file seems to be created and the test.py file is put in its own folder

#

I just want to edit a py file individually, like how it works on IDLE

#

Nevermind I'll just use vs code

neon jungle
#

so my github lfs data quota is full, and most of the stuff on there i don't need anymore anyways, so how would i go about removing some of the files from lfs?

heavy knot
#

Is there any guide on setting up a good development flow? I see python repositories having things like docker, pipenv and stuff.

sly sleet
#

I found this the other day @heavy knot

heavy knot
#

@sly sleet Thanks!

sterile sparrow
#

any site where i can host my test server.py? (it's a chat server)

late gale
#

if i delete commits will changes made to the local repo be synced automatically to my remote repo (on github) by the client ?

leaden tartan
#

github or git doesn't do anything automatically

late gale
#

@leaden tartan ok yes i've seen that, i'm using a client and trying to delete older commits from history which aren't related to the project

#

i prefer doing that through the CLI now

leaden tartan
#

okay... so?

wooden ibex
#

deleting commit history is consider a bit of no-no but yea, you can delete commits locally and push it back to github

#

assuming no protection is enabled, you should be fine

sly sleet
#

you can but its a bad idea to modify public history

#

because a force push will break other people's local history

rich nymph
#

????

#

????

remote plover
#

are you using the same interpreter ?

rich nymph
#

wdym??

remote plover
#

your second screenshot shows you installed the lib with the python interpreter in /Library/Frameworks/...

#

but are you sure your VSCode is using the same interpreter ? (you can have several installed)

rich nymph
#

hmm let me check that out

frozen anchor
#

Hi, new to gitignore and I would really like to not share a client secret in a publically shared repo of mine - so I want to make sure I understood it right.

I have a file called client.json containing private information not to be shared. If I generate a .gitignore that contains the line

client.json

do I exclude it this way?

tawny temple
#

Yes

#

You can check what files you're checking in to confirm it's ignored

sly sleet
#

just keep in mind that .gitignore isnt retroactive

#

so you cant use it to ignore already added files

frozen anchor
#

okay thanks
good to know it isnt retroactive, however I didnt commit so far so all good

fathom ermine
#

Hello👋, I am looking for a solution to add notifications 📩 to my flask website. Can you lead me to an solution that you know is working? Thank you 🙏

topaz aspen
#

what's the default ubuntu image with gitlabs CI ? I can't seem to find info on that

gleaming forge
#

Anyone had issues getting the vsc linter to work

#

I tried to turn it on after not using it for a while

#

And it's not doing anything

#

Nevermind just installed flake8 and that ones working

#

Pylint didn't seem to want to work though for some reason

heavy knot
#

you have to save

#

it only lints on save

#

and they all should work but maybe you didnt have "x" linter installed (you never told us what one you were using before)

gleaming forge
#

Na the issue was something else with pylint

#

It just straight up didn't work

#

Not to sure why

#

But flake8 is doing the job so meh

heavy knot
#

Weird

gleaming forge
#

It was working at some point

#

Then I turned it off for a bit

#

So not to sure what happened

heavy knot
#

Now set up a full pipeline that runs through flake8 bandit pylint black etc

sly sleet
#

just install the flake8 plugins

heavy knot
#

They should be project installed

#

That way anyone who helps on your code also has the same dev dependencies and setup

sand thistle
#

after i docker pull my image onto my server

#

do i have to build again?

leaden tartan
#

no that's not how docker images work

#

you need to rebuild only when there is a change in the image you want to build

loud walrus
#

Im having problems with git. I have class in 5 min so I can answer questions for a while but I will put this out there. Git has been working on this project before. Just today I try to pull some code off of github and I get this error.

sers/name/Desktop/wolfy-bot/.git/refs/remotes/origin/Add-parsing-for-messages-(Ex-"say-werf"-will-callback-"werf").lock': Invalid a
rgument
From https://github.com/Icebluewolf/Wolfy-Discord-Bot
 ! [new branch]      Add-parsing-for-messages-(Ex-"say-werf"-will-callback-"werf") -> origin/Add-parsing-for-messages-(Ex-"say-wer
f"-will-callback-"werf")  (unable to update local ref)```
I fixed that and started getting 

Can't Update
No tracked branch configured for branch master or the branch doesn't exist.
To make your branch track a remote branch call, for example,
git branch --set-upstream-to=origin/master master

But now I am back at the original. I have done many of the "fixes" that I found on stack overflow none of witch have worked.
#

Do ping me but do note it may take me a while to respond.

sly sleet
#

thats a weird branch name

loud walrus
#

BTW the branch (I didnt name it) is not a branch anymore. It was deleted via github.

#

Sorry, the branch is closed not deleted. Should I delete it?

topaz dove
#

if i'm sent a build dir with a library and tool in it, how can I add that to my environment?

#

sorry if this is the wrong channel for my question

tawny temple
#

@loud walrus Your branch name is incompatible with Windows. The lock file failed to be created because Windows' file system does not permit double quotes in file names

#

I don't know what a "closed" branch is

#

Do you mean the PR for it is closed? Cause that is not significant

#

If you don't need the branch then delete it

#

As for the second error, try running the command it suggested to set the upstream for master

loud walrus
#

Ok

loud walrus
#

Thanks!

smoky compass
#

Hi. Can anyone here help me with understanding why my seemingly identical pip installs into venvs are creating different entrypoint scripts? Full details in #help-pancakes. I was referred here

shadow crow
#

Documentation question. Is there any way to make a :term: in Python docs (reStructuredText) refer to a term but display some other text? I ran into an issue there because my language has noun cases. Even though the glossary defines the term 'текстовый файл', I need to refer to it as 'текстового файла' in the text.

#

Nevermind, found it in Polish docs -- I do

:term:`текстового файла <текстовый файл>`
#

if you ever design a language please don't put case in there

fallen phoenix
loud walrus
#

dose git checkout branch change what branch it pushes to?

#

and receive "project updates" from?

fresh wharf
#

hello, I'm having issues with nuitka + pil package, where should I look for help?

arctic flicker
#

say i am using pycharm in debug and my script throws an error. I still have access to the running program to input commands, but it will no longer run automatically without some sophisticated bypass. Is there a way to continue after an exception in pycharm?

finite fulcrum
#

I'm not sure if you can continue after an exception is raised, but you could set a breakpoint before that point and modify some values so it doesn't trigger

stable cloak
#

Docker hates me, I'm convinced

wooden ibex
#

do share

stable cloak
#

So it perpetually is stuck starting. I've uninstalled and reinstalled it, same issue

finite fulcrum
#

What OS?

wooden ibex
#

HyperV not starting up?

#

or is it using WSL?

sly sleet
#

check the logs

stable cloak
#

Sorry, just got back from deliveries. I'll respond once I see if the fixes I attempted did any good

#

Ugh, yeah now it's working

#

Had to uninstall both Hyper-V and Docker and let Docker reinstall Hyper-V for me

#

So 2 or 3 restarts

#

Seems fine now

#

Still a bit of a headache, though

heavy knot
#

There's a lot of channels and it's not really clear where this question should goes so there it is; Anyone know an implementation of bittorrent protocol in python? 😮

sly sleet
vague parcel
sly sleet
#

ah yes #hashtags

heavy knot
#

Of course i googled.. The first is 10y old and without doc, the second got potential but is in it's first version and i already wrote to the coder. Would be better to build an app with resources more sure to stay and be maintained.

#

If you see an alternative to bittorrent though it could be worth it, for a better picture; https://github.com/cldtech/absistence

#

just a description

vivid brook
#

dd

atomic granite
#

Note sure if this question should go here or one of the elemental help channels.
Is there a key combination for VSC that let's you comment-out a block of highlighted text? I asked here before a while ago but I couldn't get it to work and now I've forgotten what it was.

sly sleet
#

ctrl + / for multiple #s

#

shift + alt + a for triple quotes

#

@atomic granite

atomic granite
#

ctrl + / for multiple #s
@sly sleet This is what I was looking for but it seems to do nothing for me.
Oh I was pressing the slash on my numpad instead of the one on the ?. Thanks.

frozen anchor
#

not sure where to fit it, does sb know about a website that allows creating "pictures" of initials? Like discord does when you create a new server

heavy knot
#

what's a good method/library to use if I wanted to run some commands on remote hosts in parallel?

rich nymph
#

Who here has tried both VSC and PyCharm?
If you have then what are some features that are in PyCharm which are not in VSC and if u do like PyCharm more than VSC May I ask why so ?
Please happen to ping me for an answer

#

Ik that it's personal preferance and I respect that but I want to the reason behind that preferance. So If u have used VSC as well as PyCharm I want to know from your prespective which one you prefer and why becuase I presonally have used only VSC so It's beyond my capability to compare those two.

heavy knot
#

personally i use visual studio code. you see, in pycharm, i was really annoyed that you couldn't run more than 1 python file that is in the same project. i'm sure there is a solution but im lazy. besides that pycharm is pretty nice. you have dark mode, just like in vsc. obviously the strings and all that are coloured differently. 2 more things, it's really annoying in vsc that when you define an input() you have to go in settings and then activate the setting that makes the code run in the terminal, you know, the same place where you type "pip install module_name" and personally, i don't like the terminal, and the other thing, 1 HUGE pro that vsc has is that you can have 999 files from 99 different languages in the same folder, in pycharm, if it was allLanguagesCharm, i wouldn't have been able to do that
In coclusion, each IDE has pros and cons, if you are lazy like me, stay with vsc, but if you are "ready" to fix the new project problem, i suggest you go with pycharm. @rich nymph

rich nymph
#

hmm

#

Thank You for the answer @heavy knot. I really appreciate it if anybody has any opinions on
VSC vs PyCharm please let me know.

sand thistle
#

how does docker handle filepaths in the code

#

since you make an image of the directory

#

what happens when you make an image and then run the container, do those references hold? or what's up

quick blaze
#

what do you mean? like how does it construct the file tree from your dockerfile? it's similar to a chroot

tiny crest
#

idk if this is the correct channel, I'm running 2 python bots on the same vps, they require different versions of the same package (discord.py), I have one python install,
is there a go-to way of handling this scenario? to be able to have different packages for different deployed scripts.

pastel oxide
#

does visual studio code make use of mypy for code completion/suggestions?

long bridge
#

Does anyone here use visual code to work with python?

heavy knot
#

Yes I do @long bridge I use vscode for Python

sly sleet
#

@pastel oxide pretty sure it uses its own thing

#

do you have pylance?

sand thistle
#

anyone know how docker handles paths
because im saving a file locally and refference it later

df = pd.DataFrame(query_resolution, columns=['upload_timestamp', 'terminal_number', 'was_this_a_pandemic_related_call',
                                          'what_was_the_call', 'was_the_inquiry_resolved'])
df.to_excel('/Users/aslkdjhasd/PycharmProjects/ExpFlask/staffDashboard/output.xlsx', index=False)
return send_file('/Users/aksjdhkas/PycharmProjects/ExpFlask/staffDashboard/output.xlsx', attachment_filename="output1.xlsx", as_attachment=True)```
leaden tartan
#

@sand thistle Th easiest way would be to save the file to your current working directory

#

Or use relative paths. That way, the paths would remain platform independent

atomic granite
atomic granite
#

Does anyone here use visual code to work with python?
@long bridge Yes.

rich nymph
#

@heavy knot You said that if the person is willing to downnload stuff they should go with PyCharm?
Why did u say that, like what was the reasoning behind that?
If you do happen to download all the stuff in pycharm what features will it have that vsc does not?

heavy knot
#

@rich nymph i didnt say you need to download anything, its just that you need to configure the interpreter or something, si you can have multiple files in a project, and if you want, you can run, not at the same time tho, ok, 1 more feature in pycharm, there is a stop button, a run button, and a rerun button, unlike vsc in which you tidiously either add a quit button to ur app, if you are making a gui, or a game or something either you press ctrl m ctrl n, for me its really annoying that i have to press those keybinds every single time i want to rerun, but pycharm just has a button for that, and a keybind

rich nymph
#

yes I also meant configure, just couldn't think of that word during that time.

#

hmm I presonally use the terminal so Idk buttons

#

of vsc

heavy knot
#

that triangle in the corner

#

@rich nymph

rich nymph
#

i see

rich nymph
heavy knot
#

I have question a little bit of the topic but my vs code is not opening when i click it it just loads for a bit and stops loading but nothing happens

winged frigate
#

has anyone here deployed a full stack python app via Docker? I want to deploy a flask server with postgres database, and im having trouble setting up.

fading hollow
#

i have a gitignore file, but it seem to not work as I want

#

i added sql.py but it isnt ignored

heavy knot
#

That looks like a 1 to me

#

sq1.py vs sql.py

fading hollow
#

oh no its a l

#

but it doesnt add any other files either

rich nymph
#

I just found out about outline thing of VSC it's pretty cool

cloud elbow
#

Guys it's all in the screenshot, I fawked up and noted where I did. the numbers are message orders. please help me

wooden ibex
#

@cloud elbow I'd do XKCD method of fixing

#
#

so copy out everything you need to keep, git reset --hard origin/main (This command is destructive) and put the files back and make sure .gitignore is properly setup

cloud elbow
#

orrrr, is there an way to just reset everything to local branch?

wooden ibex
#

you have bad commits in there right?

cloud elbow
#

yep

wooden ibex
#

you can google rewriting git commit history because it's harder then my method

#

did you push the large dataset to github?

cloud elbow
#

ok I think I get what you are saying.

  • copy to another folder what I have
    -reset to remote main branch
    -paste back what I have
    -and commit

right?

#

did you push the large dataset to github?
@wooden ibex nope

wooden ibex
#

yep

#

and obviously make sure gitignore is setup to ignore the CSV files so you don't make the mistake again

#

so between 3-4, insert 3.5, make sure .gitignore is properly setup to ignore the CSV file

cloud elbow
#

got it thanks

wooden ibex
heavy knot
#

urm

sly sleet
#

whats your python version

#

@heavy knot

heavy knot
#

3.8

sly sleet
#

hmm

#

tensorflow's pypi only has wheels for mac and linux

#

and no source distro

#

let me check the unoffical wheels site

heavy knot
#

windows :/

#

alr

sly sleet
#

there's only 3.6 and 3.7 wheels 😦

heavy knot
#

bbbbbbbbruhhhhhh

#

welp thanks

sly sleet
#

wait hold up

#

im bad at reading

#

pypi does have 3.8 win wheels

#

@heavy knot

heavy knot
#

hm

sly sleet
#

32 or 64 bit?

heavy knot
#

64

sly sleet
#

is your python 32 bit or 64 bit?

#

it should be in the repl's header

slender magnet
#

looking for some people i can learn python from

mighty glen
#

@heavy knot I got the same error on python3.9 . But it worked when I shifted back to python 3.8

candid kayak
#

Hi, on trying to deploy my django application to GCP App Engine (standard environment), the documentation told me to install Cloud SQL Proxy. But the command that they tell to run (cloud_sql_proxy.exe -instances="[YOUR_INSTANCE_CONNECTION_NAME]"=tcp:3306) gives me this error

#

2020/11/01 14:06:20 listen tcp 127.0.0.1:3306: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

inner pollen
#

what is the difference between running python setup.py build and then python setup.py install and only running python setup.py install

#

if I run only setup.py install then this is the path >>> dsm.__file__ '/usr/local/lib/python3.8/dist-packages/dsm-0.0.1-py3.8.egg/dsm/__init__.py' and if i first build and then install then this is the path ```>>> dsm.file
'/usr/local/lib/python3.8/dist-packages/dsm/init.py'

desert narwhal
#

Hello, I built a state monitor using Flask! Flask State Github:https://github.com/yoobool/flask-state . Should i can get some improvement suggestions from anyone? Thanks~

thorn berry
#

hey guys, i built a package assistant using Python!!

#

would appreciate some suggestions or feedback!

dry spade
#

Hi, trying VS code, i'm looking for the shortcut to switch from terminal console to editor (and vice versa)

#

too many shortcuts 🙂

crisp python
#

Hi, I dont know if I'm in the right channel, please point me in the right direction if I'm out of bounds here :). I'm having troubles with pandas reading a csv file and running script on it. With Pandas I'm (1) exporting a csv of different stocks which I'm later (2) running a script on for each stock. The (2) script doesn't run unless I open up the csv in e.g. Libre, remove an empty column and then save the csv again. Then it miracously works for some reason. Anyone has an idea how I can troubleshoot this?

#

The charset stays the same.

crisp python
#

Hmpf, ok, seems I solved it... Still weird though. If I pass the id as an Integer it passes through. Still weird that it works also if I re-saves the file.

echo apex
#

Here is a first for me, git add . is not adding every file in my directory?

#

it's not a .gitignore problem

#

I guess I need to use git add all

#

huh, nvm, still slumped...

brisk stirrup
#

Hello everybody, can anyone tell me is
ASUS TUF Gaming A15 Laptop 15.6" FHD 144Hz Ryzen 7 4800H, GTX 1660Ti 6GB GDDR6 Graphics (16GB RAM/1TB HDD + 256GB NVMe SSD. Is it a future proof laptop atleast for 6-8 years for coding and web design and graphic design. N gaming for time pass (no important

sly sleet
#

git add -A

vagrant crescent
#

Hello everybody, can anyone tell me is
ASUS TUF Gaming A15 Laptop 15.6" FHD 144Hz Ryzen 7 4800H, GTX 1660Ti 6GB GDDR6 Graphics (16GB RAM/1TB HDD + 256GB NVMe SSD. Is it a future proof laptop atleast for 6-8 years for coding and web design and graphic design. N gaming for time pass (no important
@brisk stirrup yes

echo apex
#

@sly sleet that didn't work for me

brisk stirrup
#

@vagrant crescent 👍👍👍

sly sleet
#

what does git status say

#

and what's in gitignore

shell remnant
#

i have a question :

#

why does this code shows error?

#

init doest exist

#

the code works fine

#

hapanned a few times

vagrant crescent
#

Try Import pygame, sys @shell remnant

#

And have you install pygame

shell remnant
#

i did install pygame

#

pip install pygame

sly sleet
#

have you saved your file at all after you installed it

viral marlin
#

@shell remnant I've found the default pylint to be not great with import errors. I usually switch the flake8 and it behaves much more reliably

shell remnant
#

have you saved your file at all after you installed it
@sly sleet how do u do that? i used cmd window and typed pip install pygame

vagrant crescent
#

what ide you use? @shell remnant

heavy knot
#

he uses vsc

rich nymph
sand thistle
#

load user information using flask

#

mysql

#

and docker

#

i was told that i first need to load the csv into an instance folder

#

after which i could write a query to load from that instance folder

#

i guess i need to use a .env variable to change the filepath in the mysql ?query

rose kayak
#

Although I've been using PyCharm for years now, I'm actively looking for some new (i.e. unused by me) features in it which might enhance my workflow.

#

sharing one here, live templates seems fancy.

onyx kindle
#

I guess this would go here? I'm writing a sneaker bot (code in picture) and im trying to add the shoe in question in the cart but it wont add it and if it does it doesnt work in the cart, also the checkout seems to not work

#

any ideas?

viral marlin
#

@onyx kindle We can't help with that on this server since that breaks ToS

onyx kindle
#

ah...

#

oh well, appreciate it

rich nymph
#

can someone help me add postgresql to the path on Mac

crimson stump
#

Do you know how to set environment variables from a .env file with an ansible task?

cosmic jetty
#

hello

winged frigate
wooden ibex
#

you need to set the variables instead of just ${DB_USER}

topaz aspen
#

what do most people here use for packaging

wooden ibex
#

Packaging in what way?

sand thistle
#

help i am having an issue with mysql server

#

i tried to restart it and now it's not able to restart

#
mysql.service: Control process exited, code=exited status=1
mysql.service: Failed with result 'exit-code'.
Failed to start MySQL Community Server.
mysql.service: Service hold-off time over, scheduling restart.
mysql.service: Scheduled restart job, restart counter is at 5.
Stopped MySQL Community Server.
mysql.service: Start request repeated too quickly.
mysql.service: Failed with result 'exit-code'.
Failed to start MySQL Community Server.```
#

so i googled

#

and foudn this useful post

#

which suggested i do ```Check the permission of mysql data dir using below command. The ownership should be mysql:mysql and the directory permission should be 700

ls -ld /var/lib/mysql/```

#

when i run that command

#

this is the output

#

drwx------ 7 mysql mysql 4096 Nov 5 02:15 /var/lib/mysql/

#

i dont know how to interpret that value

#

this checks out mysql:mysql but this does not 700

sand thistle
#

anyone ?

leaden tartan
#
rich nymph
#

Hey could someone help me add postgresql to path

shy elk
#

PyCharm has feature to convert http api tests from curl to pycharm. Is there a way to do it the other way around?

abstract heron
#

Which is better in performance

zip(itertools.count,iter) or enumerate 
keen tendon
#

a

split sapphire
#

i have a doubt in pycharm
can anyone help me

urban dune
#

Hey guys, is this the right channel for AWS questions?

wooden ibex
#

close enough

urban dune
#

Alrighty. So I was given credential as an IAM user to another user's console(? not sure about the terminology here).

#

And I was wondering how should I best manage my credentials.

#

Since I have aws user credential for my own accounts too.

subtle ice
#

i'd recommend a password manager, e.g. lastpass

urban dune
#

But what about in terms of terminal?

#

I would just add it to my config?

subtle ice
#

the ~/.aws/ files support multiple entries, but I haven't tried adding multiple account-id/alias entries in it 😔

heavy knot
#

Hi,
I'm using docker image based on python:3.6-slim, where I build my project and ship it with a virtual environment (including python binaries). Now when I run the binaries from within the container it shows Python version 3.6.12 but after unpacking the project the version is the one of the target system. I read the version number by just running the binary. Which will show something like this Python 3.6.9 (default, Oct 8 2020, 12:12:24)

#

however, I use the same binaries (from the build artifact) everywhere

#

Does anyone know how that magic works?

#

And no they're not sym-links

#

I really expected to see 3.6.12 everywhere

fast cargo
#

Does anyone know why Allure is marking my Jenkins build as unstable even though there are no test failures? Trying to work out what's going on so i'm just running a test stub that asserts true and a few tests that are "deselected" (i'm using marks to select what tests are run), but the build still comes out the other end being marked as unstable (looking at the console output Allure is making is unstable)

fast cargo
#

Ok, found the problem.. I wasn't clearing out the previous results which meant that the old ones were being picked up. I'm now clearing up the work dir before starting build steps and this has resolved my issue 😄 just in case someone else is having a hard time with this..... 😄

heavy knot
#

Anyone familiar here with the indentation of yaml? I cant seem to get it right, with the errors i get from 'here' to 'here' its a script for Ansible. Someone in the mood to take a look?

tranquil creek
#

@heavy knot So, you build in a container, but you don't ship the container itself? What do you actually ship when you say "with a virtual environment"?

I expect that if you ran "which python" where you're seeing the wrong python (likely the system default python is what you're seeing).

Don't know quite what to tell you next till some of that detail is explained.

#

@fast cargo Not cleaning up the work dir has bit me in the butt before. Glad you figured it outl.

#

@heavy knot There's probably an auto-formatter online that will help you. For instance http://www.yamllint.com/ I think will show you what's wrong and should give you a cleaner output back.

alpine aspen
#

@heavy knot i opened a new folder and opened a file with .py

heavy knot
#

ok

alpine aspen
#

but i can't run a code

#

there is no static void thing there

heavy knot
#

send the ss

alpine aspen
heavy knot
#

huh?

#

dude

alpine aspen
#

what the heck ffs it's not like any ide

heavy knot
#

the file should be .py

alpine aspen
#

it was so much easier with jetbrains

#

it doesn't matter at all

heavy knot
#

not .pyproj

alpine aspen
#

it didn't work that way

heavy knot
#

i think u didnt select the interpreter

#

see the bottom left of the window

alpine aspen
#

right

#

then

heavy knot
#

it should show the version of the python ur using

#

does it?

alpine aspen
#

3.9.0

heavy knot
#

does it show?

alpine aspen
#

yes

heavy knot
#

ok

alpine aspen
#

with a blue line

heavy knot
#

so ur new to it?

alpine aspen
#

not new to python technically i used pycharm

heavy knot
#

i mean u didnt install anything in it?

alpine aspen
#

i used jetbrains for like months

#

but not this

heavy knot
#

ok ok

#

click the 4 blocks in the left bar

alpine aspen
#

i downloaded the extension

#

i did click it

heavy knot
#

hmmmm

alpine aspen
#

there is a list of extensions

heavy knot
#

the first one should be it

alpine aspen
#

its downloaded

heavy knot
#

does it show linting, debugging etc.?

vagrant crescent
#

Use pycharm its easiest for beginners @alpine aspen

alpine aspen
#

@vagrant crescent i used it a lot

heavy knot
#

well i know something even easier

#

IDLE

alpine aspen
#

it was minimalist and really performative

heavy knot
#

it is minimalist?

vagrant crescent
#

Minimalist for what?

alpine aspen
#

but i crossed vsc since it's common n so

#

it's just simple u type ur code it works every time

vagrant crescent
#

Why it minimalist?

alpine aspen
#

no caprisé like vsc

heavy knot
#

does it crash on an infinite loop?

alpine aspen
#

it does your job with simple interface and usually no trouble

#

you can stop your code anytime so no

does it crash on an infinite loop?
@heavy knot

heavy knot
#

oh ok

alpine aspen
#

i couldn't even start to run my code on vsc

#

look at this mess dude

vagrant crescent
#

Are you using python plugin in vscode?

alpine aspen
#

i do

vagrant crescent
#

Show me

alpine aspen
#

i don't get why people love this bench

vagrant crescent
#

Hmm, have you try terminal to type

alpine aspen
#

type what

#

dotnet run yes i did

#

if you're sayin' anything else idk

#

no solution huh

vagrant crescent
#

Create new file and name it .py

alpine aspen
#

i did

#

no such a file or directory

#

error

#

when i run the code

vagrant crescent
#

Pyproj

#

.py

alpine aspen
#

"fall.pyproj"?

#

fall is the name tho

#

and there is a pop-up that tells me to install linter pylint

#

idk what's that but when i do clicck install after 45 secs it gave an error too

vagrant crescent
#

What is .pyproj?

alpine aspen
#

what

#

i changed it to .py and didn2t work tho

vagrant crescent
#

Your file name is pyproj

alpine aspen
#

no its not

#

should it be tho xd

vagrant crescent
#

Idk try pycharm or try google

alpine aspen
#

pycharm is cool

vagrant crescent
#

Yeah i use it

alpine aspen
#

but i don't get why vsc is troublesome,

#

i used vsc for c#

#

of course there was issues too

#

but somehow it's workin' at least

vagrant crescent
#

I use vs 2019 for c# 😄

#

Yeah

alpine aspen
#

it's good if u have a happy relationship with the bench

#

but i still don't get why people love this

vagrant crescent
#

Idk pycharm is better for python its my option

sly sleet
#

vsc is better than pycharm imo

#

much easier to use and less bloat

#

as long as you know that python files end in .py

#

And that the run button is in the upper right corner

echo apex
#

Has anyone used an EC2 dedicated host vs non dedicated in AWS?

#

Wondering how they both differ from preformances

cosmic jetty
#

ABstraCti¤n{B¤x =>(bindObservable = n2sFiles{network, security, storage}) Unb¤x =>(bindObservable = i2rData{reliability, integrity, redundancy})}

heavy knot
#

@heavy knot There's probably an auto-formatter online that will help you. For instance http://www.yamllint.com/ I think will show you what's wrong and should give you a cleaner output back.
@tranquil creek Thanks thebouv for your advise .

spark falcon
#

has anyone here worked with PRAW?
I am a bit confused about how to use an authorized reddit instance
so for example created an authorized reddit instance in order for it to access some reddit contents or comment in a specific subreddit (defined with <reddit.subreddit>) . Is there any way to make the bot acct join a community? What I meant is to invite it as the subreddit admin not some exploits.
The read-only instance does not have this type of problem which i think makes sense.
lemme explain (read the comments in the code block otherwise you won't know what I'm saying ) :

# reddit1 defined as a read-only reddit instance
subreddit = reddit.subreddit('redditdev')
print(subreddit.display_name) #Output: 'redditdev'

# and now reddit2 is defined as an authorized reddit instance
#trying to access a subreddit right here.
subreddit = reddit.subreddit('redditdev')
print(subreddit.display_name) 
# when trying to access an attribute from that subreddit throws an auth error

does anyone know what I need to do to make contents of a subreddit accessible to an authorized reddit instance?

#

this is the category that best fits my topic imo, sorry if im asking at the wrong channel

storm phoenix
#

ok so i am jus starting to learn docker and i created a Dockerfile

FROM nginx:latest
ADD . /usr/share/nginx/html #i have tried using COPY also

I have both the file in same folder
and a normal .html to serve to nginx image but i cant get past the default page

#

what i've done:

docker build -t test:latest .

to build the image and then run it on port 8080 using

docker run --name example -d -p 8080:80 test:latest
#

ping me if anyone replies

tacit garden
#

what is the actual problem @storm phoenix

#

you said what you're done but not what's happening

storm phoenix
#

My static file is not being served

#

I get the default nginx welcome page only

#

@tacit garden

minor iris
#

😦

cosmic jetty
#

Morning

heavy knot
#

Hey, I am trying to make an tool about Snapchat really. And I found this on GitHub https://github.com/niothiel/snapchat-python which looked kinda nice and helpful. Although when I run my softwares it says "no module named Snapchat". Even in the example.py software it says "No module named Snapchat". I have ofc tried "pip install Snapchat" and installed it. Although it's not working. And yes I have installed everything that the developer want me to install, someone help? pepehappy

cosmic jetty
#

You import it?

heavy knot
#

Yep, I have imported it

cosmic jetty
#

Not sure

#

Maybe if you showed code snippet w/error.

sly sleet
#

@storm phoenix try docker run --name example -d -p 8080:80 test:latest /bin/sh and cd'ing to the dir

#

do you see anything?

storm phoenix
#

yes i executed the shell and there were my files their

#

changing my html file name to index.html worked for some reason

#

if you know why that worked do tell

tranquil creek
#

@storm phoenix because nginx, apache, and other web servers need to be told what the directory index file is going to be or it assumes index.html

You probably could have explicitly called your whatever.html file but it isn't just going to serve it up by default, it wouldn't know to do that. Once you renamed it, it was like "here you go"

#

@heavy knot Do you have python installed?

#

Because to be sure you don't have pip you can try python -m pip install blahblahwhatever to see if pip can at least run as a module and is installed like that. Might just be that the pip command itself is available but maybe not in your PATH

storm phoenix
#

Ah so my home page would have to be named index.HTML for it to work right @tranquil creek ?

tranquil creek
#

@storm phoenix well, it does work right, you just didn't know

And your index can be whatever you want. For instance if you built a Flask app and dockerize it, you wouldn't be setting the system up to load index.html

It's going to vary on what you're doing. But if all you want to do is serve up that index.html file, you're good.

#

@heavy knot glad it worked

dense forum
#

im using VSCode, anyone knows how to change the debug settings

#

i switched from powershell to git bash terminal

#

and when i debug the file it doesnt recognize the command anymore

gusty willow
#

did you figure it out @dense forum ?

dense forum
#

not yet

sand thistle
#

any good learning resources/ideas on how to handle a development server or how that part of programming even works

#

doing a flask app

sand thistle
#

alright i have learned that i should probably create a separate instance for each stage

#

and i might need to have different branches on my git tree

#

and connect them to docker as needed

#

should i rebase

storm phoenix
#

@storm phoenix well, it does work right, you just didn't know

And your index can be whatever you want. For instance if you built a Flask app and dockerize it, you wouldn't be setting the system up to load index.html

It's going to vary on what you're doing. But if all you want to do is serve up that index.html file, you're good.
Ah okay got it thanx for the help

tranquil creek
#

what do you mean @sand thistle ?

One typical flow is to dev locally till stable, then deploy to a dev server. Once dev is complete, you can deploy to production.

Or develop locally and test in a docker container, then deploy the docker container to one or more places.

I suggest you look up gitflow and github flow to learn about branching strategies. There is also trunk based development.

You can also look into some simple ci/cd tools so that on check in of branches you can have builds created automatically.

It really all just depends on what you want to do.

sand thistle
#

But in each instance you'd need to create a separate server, which in my case would need its own docker container

#

So the idea is to copy the full stack on each server? Including the db?

#

And the docker container

tranquil creek
#

There are LOT of intricacies to this I hope you understand, but yes, typically you'd also want a dev db and prod db, separate. And each container knows which one to talk to on deployment due to the environmental variables you have set up on each server.

So when your container is on dev server, or your local machine, you've set up a config in env that says which db connection info to use. Deploy to prod, it knows which db there too.

Again, this is a super shallow explanation and a lot of things will depend on .. well .. a lot of things. 🙂

#

your dev server and local dev for instance can even ship around a db in a container, but for production I (and many others) suggest not containerizing your prod db itself.

#

That's the beauty of docker based workflow is that you can ship your app anywhere and expect it to work (provided you give it all the info it needs like which db to connect to obviously). None of this "works locally, but not on the server" stuff.

chilly flame
#

Hello. I'm running pipenv so I have a virtual environment. When you run pipenv shell to create the virtual environment, it creates you a file called "Pipfile". Should I .gitignore it? because I haven't seen that file in any repository or something. Also, is it possible to change the name of it? At least the capitalization (same name but in all-mayus for e.g.)

heavy knot
#

me and my friend are trying to convert a python file to exe,tried using pyinstaller,autopytoexe,nuitka but the application crashes and yes i am using external libraries.

chilly flame
heavy knot
#

@chilly flame tried it but its crashing after packing it

#

its showing failed to execute the script bro

chilly flame
#

I found that video but I don't really know what that's happening to you. Hope you find the solution

tranquil creek
#

@chilly flame Pipfile (and a lock file version of I believe) are created by pipenv and yes you should keep it in your repo. Part of your installation instructions for your repo should be to use pipenv as well.

#

This is similar to package.json and package-lock.json

#

from npm

chilly flame
#

Alright. Thank you!

heavy knot
#

Hi ! I'm new to python discord (and more generally to discord), hopefully here is the right place to ask...

#

I'm starting to use spyder as development environment, and I couldn't find out how to have several independent projects.

#

I mean: is it possible to have a number of files that are parts of a given project, and then close all these files and open another project with its set of files?

quasi mesa
#

Hi ! I'm new to python discord (and more generally to discord), hopefully here is the right place to ask...
@heavy knot Are you referring to opening up multiple instances of spyder?

heavy knot
#

@quasi mesa No, I want to be able to work on a given project, then close all the associated files and open another project - no need to have both running simultaneously.

quasi mesa
#

It should be possible yes, just open up the project that you want to start working on

#

it should import all the files and what not

heavy knot
#

But how is a "project" defined?

quasi mesa
heavy knot
#

I can only find how to open a single .py file...

quasi mesa
#

wait what

heavy knot
quasi mesa
#

open up sypder

#

in the file tab

#

there should be an option to open up a project

#

it should be open

heavy knot
#

Oh, now I see, there's even a "Projects" menu in the menu bar... I should have looked better before asking!

#

thanks for the link anyway, I will have a look 🙂

hushed orbit
#

How does Github branch protection name pattern matching work?

#

We've tried everything we can think of to match multiple branches without luck

verbal oriole
#

Having troubles with Python Pyglet. Can anyone help me? If not, where should I go for help?

twin hull
#

Hello, I've a question concerning mypy. I've a A class provided by an external librairy, from which I inherit in my B class. A has an attribute foo which I would like to extend in my B class, but conserving compatibily with all A method, that's why I inherit from the type of the foo however I get an error from mypy:
Incompatible types in assignment (expression has type "List[D]", base class "A" defined the type as "List[C]")
MRE:

class A:
  foo: List[C]
class B(A):
  foo: List[D]

with D definition:

class D(C):
  #...

Any idea how to get around this?

dusty maple
#

@twin hull List is invariant in this case, List[D] is not necessarily a subtype of List[C]

#

Sequence on the other hand, is covariant as it's immutable, making Sequence[D] a subtype of Sequence[C]

twin hull
#

Thanks, but is Sequence[D] a subtype of List[C]? I can't change the C one since it's from an external package

dusty maple
#

Sequence is a supertype of List, you'd probably want to convert it to the latter first

#

Although I think it'd be weird for an external package to not accept any sequence type and then just converting it to a list internally if needed

eager rose
#

@rich nymph for me, since I don't need vsc's ability to use multiple langs, pycharm is much more focused on python dev so I like it more

rich nymph
#

multiple langs?

#

and "pycharm is much more focused on python dev so I like it more" this isn't really that explanatory, like at least give me the features that it has which makes want to make u choose it over vsc

eager rose
#

vsc has pretty much all the features pycharm has, just not out of the box

#

since they're very similar, I like pycharm more

rich nymph
#

ye, u just have to acutaly put in the work to get those features running

rose kayak
#

PyCharm's debugger is awesome

heavy knot
#

any way for me to do a
input()
is vsc WITHOUT IT TELLING ME TO OPEN THAT STUPID TERMINAL, because i don't like the terminal?

#

so like do a input() in the output tab in visual studio code

buoyant reef
#

Hello, would someone be willing to help me out with running django + postgresql in docker. I am getting an issue when connecting to the database.

blazing condor
#

sure, what errors do you get?

buoyant reef
#

And I can confirm it is running locally and accepting connections on there because of this.

blazing condor
#

ahh okay, what is the database URI that you are using?

buoyant reef
#

What do you mean.

#

Kinda new to this stuff to be completely honest

blazing condor
#

all good!

#

in the settings.py of your django app, what do you have set for the DATABASES variable?

buoyant reef
#
DATABASES = {
    "default": {
        "ENGINE": 'django.db.backends.postgresql',
        "NAME": os.environ['SQL_DATABASE'],
        "USER": os.environ['SQL_USER'],
        "PASSWORD": os.environ['SQL_PASSWORD'],
        "PORT": 5432,
    }
}
blazing condor
#

ahh okay

#

so you need a HOST key in the default dictionary

#

it can be an environment variable as well

#

should be 127.0.0.1

buoyant reef
#

Ok, I thought it would set that as default...

#

I misread the doc oops

blazing condor
#

the default is /var/run/postgresql i believe

buoyant reef
#

Yeah, just re reading it. I read that totally wrong.

#

Lets see, rebuilding.

#

So question, how come if I build the db detached and then run the server locally like pipenv run start or something it connects with no issues?

#

@blazing condor That did not seem to work. Should it be 0.0.0.0 or 127.0.0.1 for host?

blazing condor
#

hmm well, that's interesting

#

either of those IPs should work

buoyant reef
#

Wait

#

No, I think I know the issue one sec.

blazing condor
#

So question, how come if I build the db detached and then run the server locally like pipenv run start or something it connects with no issues?
that's quite odd, unless you have postgres running on your system as well

buoyant reef
#

I do not.

#

Well I do not think so.

blazing condor
#

what OS are you using?

buoyant reef
#

Actually just confirmed yeah. If I turn the docker container with my db off it cannot run. If I turn it on it works. (running it detached that is with -d)

#

Windows 10

blazing condor
#

are you using WSL or just windows itself?

buoyant reef
#

Windows itself

blazing condor
#

if just windows, odd things with docker and windows 10 then i guess

buoyant reef
#

Ok, so how would I go about using sockets to ensure that the database is ready before I attempt to run migrations and running the server? I tried using the same code that we have for pydis but it did not seem to work.

blazing condor
#

could i see your code?

buoyant reef
#

Of course

#
import socket
import time
import sys

from django.core.management.base import BaseCommand
from django.core.management import call_command

class Command(BaseCommand):
    help = 'An alternative to runserver which will run migrate and collectstatic beforehand'

    def handle(self, *args, **options):
        # Attempt to connect to the database socket
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

        attempts_left = 10
        while attempts_left:
            try:
                # Ignore 'incomplete startup packet'
                s.connect(('127.0.0.1', 5432))
                s.shutdown(socket.SHUT_RDWR)
                print("Database is ready.")
                call_command("migrate")
                call_command("collectstatic", interactive=False, clear=True)
                call_command("runserver")
                break
            except socket.error:
                attempts_left -= 1
                print("Not ready yet, retrying.")
                time.sleep(0.5)
        else:
            print("Database could not be found, exiting.")
            sys.exit(1)
#
# Run web server through custom manager
ENTRYPOINT ["python", "manage.py"]
CMD ["start"]

This is how I am calling it in my docker

blazing condor
#

hmm alright, do you get any errors? or any output at all?

buoyant reef
#

Well the except is catching it

blazing condor
#

ahh, so it just says Not ready yet, retrying. 10 times?

buoyant reef
#

Yes

blazing condor
#

ohh okay, so when you run via docker-compose, it's a bit different

#

the host will need to be the name of your postgres container

#

which happens to be postgres

buoyant reef
#

ok

#

So just change the host on databases

#

But the socket thing would still fail no?

blazing condor
#

you'll want to use the environment variable for the host and port there as well

#

so you don't need to change the values in two places

buoyant reef
#

Yeah, not sure why I did not put those in the environment variables tbh.

blazing condor
#

i can understand the frustration you probably have right now 😄

cosmic jetty
#

Good evening

buoyant reef
#

Yeah, I do not quit though which I guess is good. I have been at it since yesterday but had worse errors.

#

I am trying to implement continuous integration so this is why I am going with docker.

blazing condor
#

ahh yes, i remember all the initial headaches i had with all of that.. not fun at first i must admit

#

nowadays, i really can't create a project without docker or CI

#

it's really great

buoyant reef
#

Do not get me wrong. I am loving docker so far. Just the database connection to the application through docker is really messing me up.

#

My initial struggle was getting the psycopg2 dependencies installed. Lots of trial an error.

cosmic jetty
#

I looked up how to do that a couple days ago

blazing condor
#

i'm not sure if that's even possible on windows

#

doesn't sound fun

buoyant reef
#

well the docker is running debian

cosmic jetty
#

Docker script isn't platform specific I imagine

blazing condor
#

ahh okay, that'll be much easier

#

docker volumes between windows and unix are quite different actually

#

are you using the postgres image, Snowball?

buoyant reef
#

I am

#
version: '3.7'

services:
  dms:
    # image: /dms:latest
    build:
      context: .
      dockerfile: dms.Dockerfile
    container_name: dms
    restart: always
    ports:
      - 8000:8000
    env_file:
      - .env
  db:
    image: postgres:12.0-alpine
    restart: always
    container_name: postgres
    ports:
      - 5432:5432
    environment:
      - POSTGRES_USER=dms
      - POSTGRES_PASSWORD=admin123
      - POSTGRES_DB=dms-db
    volumes:
      - postgres_data:/var/lib/postgresql/data/
volumes:
  postgres_data:

That is my compose

blazing condor
#

it should be fairly straightforward then

buoyant reef
#

@blazing condor It was, I just was not sure what the dependencies were...

#

a simple apt install fixed it. Just did not know what to install.

blazing condor
#

ahh understandable

#

i typically don't use alpine images

buoyant reef
#

What is the difference?

blazing condor
#

alpine images are specifically for use within containers, but the big downside is there are typically compatibility issues that are difficult to debug

buoyant reef
#

So just remove the alpine from it?

blazing condor
#

it's your choice really

#

the advantage is the images are much smaller

buoyant reef
#

Oh ok, maybe if I had the other image it would of had the dependencies I needed pre installed lol

blazing condor
#

lol, maybe

#

that's also another disadvantage

#

alpine doesn't have some common dependencies pre-installed

buoyant reef
#

welp, I will just leave it for now maybe

#

Now just need to figure out why the server is not running. Docker build worked.

blazing condor
#

any errors?

buoyant reef
#

Before I forget to ask. How did you know that my host was set to postgres? Is it just the name of the container?

#

any errors?
@blazing condor None

blazing condor
#

yep, it's the name of the container

buoyant reef
#

... wow

blazing condor
#

oh wait a minute

buoyant reef
#

Should have guessed that

blazing condor
#

i've been mistaken lol

#

sorry, i usually use postgres instead, and i assumed you did the same

buoyant reef
#

so what does container_name even do in there?

blazing condor
#

it's just the display name

buoyant reef
#

Oooooh, I thought that would actually change the name of it.

blazing condor
#

the network that docker-compose creates for your stack will use db and dms for the host names of your containers

buoyant reef
#

Ok

blazing condor
#

i would recommend to add this under dms in your docker-compose.yml

depends_on:
  - db
#

that'll make sure your db starts before django

#

it does not however make sure that the db is fully initialized and ready to accept connections

buoyant reef
#

Alright, because I think I am doing something wrong with that socket thing I have.

#

Lets see, rebuilding now.

blazing condor
#

huh

#

could i see the rest of the logs?

buoyant reef
#

Well, I think I know what I did wrong there. For some reason I thought it would be smart to put the call commands inside of the try except. If I get another error now I will show you

blazing condor
#

okay, i think it's good now. the database system is starting up is probably from the socket connect calls, which is fine

buoyant reef
#

No errors, containers are running. But the server was not started

blazing condor
#

oh, it wasn't?

buoyant reef
#

Nope

#

Also there were 7 of those but the script should only attempt 5 connections

#

1 every .5 sec

#

Nvm it attempts 10 connections

blazing condor
#

interesting

buoyant reef
#

I think it might be with how I am calling the commands in that start command. Idk really.

#

Sometimes I feel worse when I am not getting errors....

blazing condor
#

can you delete the postgres_data folder?

#

and then restart your stack

#

might be because postgres did not shut down properly before

buoyant reef
#

Oh yeah, so that is a total mystery to me. Volumes... read the docs and did not quite get it. Where will those be located?

blazing condor
#

should be in the same directory as your docker-compose.yml

buoyant reef
blazing condor
#

you'll probably did need administrator privileges to delete it

#

might be hidden on windows? not entirely sure

#

on linux, you do need to use sudo

buoyant reef
#

Let me do some digging I guess

#
[
    {
        "CreatedAt": "2020-11-09T21:21:02Z",
        "Driver": "local",
        "Labels": {
            "com.docker.compose.project": "divisionmanagementsystem",
            "com.docker.compose.version": "1.27.4",
            "com.docker.compose.volume": "postgres_data"
        },
        "Mountpoint": "/var/lib/docker/volumes/divisionmanagementsystem_postgres_data/_data",
        "Name": "divisionmanagementsystem_postgres_data",
        "Options": null,
        "Scope": "local"
    }
]

Found the information is. Now have to figure out how that maps on windows

blazing condor
#

could you do docker volume ls ?

#

and find the one that is named dms_postgres_data

#

or something like that

buoyant reef
#

Alright

#

So I can see the volume exists but it says the mountpoint is in "/var/lib/docker/volumes/divisionmanagementsystem_postgres_data/_data"

#

Not sure what that corresponds to in windows though.

blazing condor
#

okay great, you should be able to do docker volume rm divisionmanagementsystem_postgres_data

buoyant reef
#

Alright, all done. Now lets rebuild

#

Alright no errors. Still same issue though

#

Do you know the command to run the shell for the docker instance? So I can manually try to runserver

blazing condor
#

docker-compose exec dms bash

#

does this happen to be open source?

buoyant reef
#

The project?

blazing condor
#

yeah

buoyant reef
#

Not really, why?

blazing condor
#

ahh okay, i was just seeing if i could look at the files to try and see if i could spot any issues

buoyant reef
#

@blazing condor Oh you can, I do not mind. I just don't have this stuff pushed to github

#

The project is public atm.

#

There are no trade secrets lol

#

Figured out the issue tho I THINK

blazing condor
#

hahahahah

buoyant reef
#

Could that be because of the ports set up for dms on the docker-compose file?

blazing condor
#

hmm

#

it wouldn't have to do with the docker-compose file

buoyant reef
#

I am just spit balling at this point lol

blazing condor
#

the ports you specified allows port 8000 from the container to be accessed at port 8000 on your host

#

lol

#

i really want to blame windows for this issue, but i don't really have any solid evidence to do so lol

#

it should work as far as i can tell

buoyant reef
#

Lol

#

Well on the bright side, no more errors.

blazing condor
#

i don't know if that's any better lol

#

now you don't know what's wrong

buoyant reef
#

I think it is worse lol

blazing condor
#

hahahah

buoyant reef
#

now you don't know what's wrong
@blazing condor Yeah... lol

#

Oh man

#

Well, I am just going to commit this like this for now so I can continue at home.

#

Let me commit and I can send you the git stuff

#

if you want

blazing condor
#

yeah, that'd be great

#

i'll try and see what i can do

buoyant reef
#

Of course now git wants to act up

blazing condor
#

what's the issue?

thick veldt
#

Hey all, has anyone here used WSL-2 for development? I'm thinking of trying it out after recently switching to windows as a dev environment (sorry if wrong channel)

blazing condor
#

i would very much recommend WSL2 if you have to use windows for development

thick veldt
#

as opposed to running everything from a vm?

buoyant reef
#

what's the issue?
@blazing condor Honestly idk. PyCharm threw 4 errors then just did the push...

thick veldt
#

I like using virtualbox as a server practically on my windows box

buoyant reef
blazing condor
#

if you'd rather use a vm, that's fine as well

buoyant reef
#

Feel free to critique all of it lol.

blazing condor
#

lol alright, i'll have a look after dinner

buoyant reef
#

Cool thanks

buoyant reef
#

@blazing condor I am a bit confused. I removed all the call commands so I could just run them manually but it seems that the start script is running again and again.

#

Any clues?

blazing condor
#

hmm

#

so maybe the django app could be crashing?

#

and then docker will infinitely try to restart the container since you have it set to restart: always

#

either that, or your start command is somehow calling itself

buoyant reef
#

Yes it is crashing

#

Not sure what is causing it though

#

@blazing condor This is the error RuntimeError: Can not reuse socket after connection was closed.

#

requests.exceptions.HTTPError: 409 Client Error: Conflict for url: http+docker://localnpipe/v1.40/containers/7dab9b559eb63658a21e45fc83cf81d75147b1000789292e696c2dc721def6d7/attach?logs=0&stdout=1&stderr=1&stream=1 This one happened first actually

blazing condor
#

uhh lol

#

i've had no luck over here either, but with different errors

buoyant reef
#

Lol

#

Welp, I feel like I am so close yet so far.

#

This reminds me of the first time I deployed a Django app.

#

That was a nightmare

blazing condor
#

hahahahah

buoyant reef
#

So did you clone the repo?

blazing condor
#

yeah i did

buoyant reef
#

Ok, try something

#

Run the database by itself using -d and run the server using pipenv run start

blazing condor
#

yeah, it works perfectly fine

buoyant reef
#

Ok cool

#

Lol

#

Just making sure

blazing condor
#

i did that earlier and was like huh, okay

buoyant reef
#

So it has to do something with the docker set up right?

blazing condor
#

that would be logical, but who knows lol

#

i've never had issues like these though, which is quite interesting

buoyant reef
#

I have removed the -alpine from postgres, maybe it is a dependency issue?

#

🤞

#

And nope.

blazing condor
#

i also tried that already

buoyant reef
#

Oh

#

I actually had some hope that would work....

blazing condor
#

yeaah, not very fruitful results

buoyant reef
#

You are using windows as well? OR linux?

blazing condor
#

linux

buoyant reef
#

So it is not os specific

blazing condor
#

i dual boot with windows, but i haven't used it in ages 😄

#

it doesn't seem like it, nope

buoyant reef
#

Ah nice. I am not really sure what else to test...

#

Maybe removing all the images from the container except for dms?

blazing condor
#

i'm not really sure

#

i'll try again tomorrow since i have a bit of work i need to finish up tonight

buoyant reef
#

Alright, just fyi that does not help. Thanks for trying

#

May you have better results with your work lol

blazing condor
#

hahah, thank you

pure ginkgo
#

Hi is the right channel for discussions related to selenium ?

#
from tab crashed
  (Session info: headless chrome=86.0.4240.193)```
#

I am actually having this error while running a python program but i dont know where to start looking for issues

lost night
#

Anyone using pip-tools (pip-compile and pip-sync)?

#

My problem is pip-sync in a venv seems to try to uninstall globally installed packages

#

pip-sync [.venv]
Found existing installation: anki 2.1.26
Uninstalling anki-2.1.26:
ERROR: Exception:

#

My pip list:

#

python -m pip list
Package Version


click 7.1.2
pip 20.2.4
pip-tools 5.3.1
setuptools 49.2.1
six 1.15.0

rich nymph
#

How do u change the theme in vsc using settings.json?

spice flicker
#

Hey guys! Is there anyone who is familliar with Microsoft Edge (Chromium)'s CLI switches?

sand thistle
#

so should my test serv hooked up to the internet? like should it have a url

finite fulcrum
#

Do you need it to be accessible from outside of your LAN?

#

(you can get a local URL pointing at it)

sand thistle
#

im not sure

#

i basically develop locally on my computer

#

then push changes to git, which is connected to docker so an image gets built

#

then i pull that image to my server and run it there.

#

dont i need to test the docker interaction as well?

#

@finite fulcrum

#

it's a webapp

#

i took a snapshot of my droplet, and was going to make that my testing/staging platform, and i think i need to get an actual url to work with. Because I want to make sure everything is working from start to finish

#

i guess yeah, if im serious about testing I should have a manual tester check it out and to do that I'd need a url

finite fulcrum
#

I'm not very familiar with the devops, but that sounds like it should just ran be locally for everyone until deployment

sand thistle
#

so we are really decentralized

#

like its me on my laptop

#

hmm ok

#

idk ill think about it

#

I would feel comfortable testing to make sure that the docker container is deployed properly

#

sometimes I've had issues with env files not pointing correctly through the container

cosmic jetty
#

morning

wooden ibex
#

6a6, why are you asking about Edge switches?

glacial ruin
#

how do i deal with access denied while connecting sql and pycharm even tho i have entered the correct username and password

spice flicker
#

@wooden ibex I asked it in order to use the proper parameter in chromium-based browsers to open a new tab in the existing window

#

Like If your Edge's window is open -and also it's your default browser- and you click on to the discord link, it'll open a new tab in the existing window

#

I want to do that too lol

wooden ibex
#

got it

#

I thought you might be wanting to download something

#

that I have no clue

spice flicker
#

There is a --new-window parameter, but it opens a new window as expected lol

#

By the way, is there a way to insert an inline code block

sly sleet
#

surround with single backticks

#

like this

spice flicker
#

Ah thanks @sly sleet !

rich nymph
#

hey could somebody help me. So every time I open vsc and try to code something in python I get this.

#

and when I try to install it

#

it just does the same thing every 10 seconds of me trying to actually code something

#

could somebody tell me how I can fix this?

coarse dust
#

search Xcode develop tool terminal

#

in google

#

should work

rich nymph
#

hmmmm

hushed orbit
#

How do i force a pullrequest with github actions?
I'm trying to automerge down our pipeline where it stops if it gets a merge conflict, and creates a PR for the developer to review.
This is what i have, but it stops at the Rc to develop Pr creations saying the head is even
https://paste.pythondiscord.com/ceyihuwika.sql

heavy knot
#

Can someone help me to make a code that pauses a spotify song with the voice? PLEASE 😦

spice flicker
#

Hey! What do you want to build?

#

@heavy knot Are you going to control it from the Spotify API or from desktop app?

heavy knot
#

@heavy knot Are you going to control it from the Spotify API or from desktop app?
@spice flicker Yes, the code make all

spice flicker
#

I guess it can't make all in the same time?

#

It'll be confusing, won't be?

#

Look I found an idea

#

@heavy knot For windows, if you press FN+F7 (on laptops it'll maybe differ) the audio stops regarding your current window or audio source

#

And you can write a basic script where when you say "Stop", it'll press to that button

#

I know it's not an elegant solution but else it'll be a bit complicated, but why not!

heavy knot
#

Do you speak spanish?

spice flicker
#

Ah I guess no lol

#

But french

heavy knot
#

xd

spice flicker
#

Ah so you're experiencing some linguistic issues, aren't you lol

#

Para Windows, si presionas FN+F7 (en las computadoras portátiles puede ser diferente) el audio se detiene con respecto a tu ventana o fuente de audio actual

#

Y puedes escribir un guión básico en el que cuando digas "Detente", presionará ese botón

#

Sé que no es una solución elegante, pero si no, será un poco complicado, ¡pero por qué no!

#

@heavy knot

heavy knot
#

@spice flicker

#

imd

frozen anchor
#

source: https://www.freecodecamp.org/news/how-open-source-licenses-work-and-how-to-add-them-to-your-projects-34310c3cf94/

Can sb explain me why GPL is considered a restrictive licence? I thought the (basically) only restriction on GPL is that it has to stay open source and used it in the past for my personal github projects

freeCodeCamp.org

by Radu Raicea How open source licenses work and how to add them to your projectsImage credit: GitHubRecently, there was some exciting news for developers around the world. Facebook changed the license of multiple libraries they develop. They switched from BSD-3+patents to a M...

dense rune
#

@frozen anchor I believe the language is referring to the fact that GPL forces specific behaviors and licensing of your code (some reference GPL as a virus, as it forces dependent code to follow its license in some cases). You can't pull in a GPL library directly into your code and license your code as MIT. You can pull in a MIT license and GPL license your code. For a personal project, this is mostly irrelevant. Some folks get around this with shim's to isolate the GPL code out, which introduces specific architectures to protect your codebase from GPL.

heavy knot
#

can anyone help me deploy my bot to digital ocean ? i am using putty right now and i logged into my sever so what do i do next ping me pls

tepid citrus
#

@heavy knot well, you should follow this first to configure the VPS if you don't know what you're doing (im assuming you're using the ubuntu 20.04 image) https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-20-04

as far as deploying the bot, that entirely depends on how you intend to deploy it. if you have put the bot into a docker container, then you just need to download docker -> pull your container from your docker hub repo -> create the container and then start it in the background.

another way to deploy the bot is to create a service that runs in the background at all times.

DigitalOcean

When you first create a new Ubuntu 20.04 server, you should perform some important configuration steps as part of the basic setup. These steps will increase the security and usability of your server, and will give you a solid foundation for subsequent

#

if you don't have any idea about how you want to deploy your bot, then i would suggest learning how to containerize your bot with docker because once you know how it works, it's really easy to get things up and running instead of managing service files

heavy knot
#

thank you

sudden hatch
#

can someone help

#
from pyautogui import *
import pyautogui
import time
import keyboard
import random
import win32api, win32con

def click(x,y):
    win32api.SetCursorPos((x,y))
    win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,0,0)
    win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,0,0)

time.sleep(2)
pyautogui.displayMousePosition(x, y)
time.sleep(2)```
exexcuted this code in sublime then it crashed the app
short peak
#

hello. I'm trying to start using types definitions in my code. I use vscode so I started by installing mypy extensions. I don't see it warning me about missing types definitions. These are my settings

    "python.linting.enabled": true,
    "python.linting.mypyEnabled": true,
    "python.linting.mypyCategorySeverity.error": "Hint",
    "python.linting.mypyArgs": [
        "--strict",
        "--python-executable ${workspaceFolder}"
    ]
}``` 
 
a code like this doesn't trigger any warn
```def list_objects(bucket, prefix):
    o_list = s3_client.list_objects_v2(Bucket=bucket, Prefix=prefix)['Contents']
    return o_list``` 
 
any idea  what could I be missing?
rich nymph
#

Hey could somebody help me change the fonts in VSC

#

cause I can't seem to do it

#

i changed it workspace but nothing happened

heavy knot
#

Did you install that font?

rich nymph
#

Oh, I have to install it?

#

where do I install it from?

heavy knot
#

What os are you on

rich nymph
#

mac

heavy knot
rich nymph
#

thx

#

I apprecieate it

heavy knot
hushed orbit
#

Might have to add quotes around the font name as well

rich nymph
#

@heavy knot so Install the entire thing?

heavy knot
#

No

#

Read through the readme

rich nymph
#

k

heavy knot
#

They provide a zip file which you're supposed to download

rich nymph
#

oh right i see

#

thx @hushed orbit , @heavy knot
I apprecieate it

rich nymph
#

Is there a way to search for a specific name in vsc, across your entire workspace

heavy knot
#

What do you mean by that?

#

Like some text across all your files?

rich nymph
#

yes across the entire folder

thin oriole
#

The search page (CTRL+SHIFT+F) does that unless I'm misunderstanding

rich nymph
#

thx

thin oriole
#

Is there a VSCode plugin that will show me a "flattened" view of a class' inherited structure? For example, if I have the structure

class Parent:
    def my_parent_func(self):
        print("my_parent_func")


class Child(Parent):
    def my_child_func(self):
        print("my_child_func")

I want to see this view of Child

class Child:
    def my_parent_func(self):
        print("my_parent_func")

    def my_child_func(self):
        print("my_child_func")
#

Optionallly, it would be nice for there to be some indication that the my_parent_func fuction came from Parent speficaly, to help with complex inheritance structures

cosmic jetty
#

Hi

inland bramble
#

hi, i’m not sure to post this so i hope here is ok, i’ve been trying to convert a .py file into a .exe file using pyinstaller but it comes up with an error when i try to run the .exe file saying “ModuleNotFound error”. i used pyautogui and time modules so i’m guessing it’s the pyautogui module that’s causing the problem. what can i do to fix this?

misty shell
#

Hi, just spent 3 days on my first Python course and I am using PyCharm. I'm trying to load sms4 from pypi to send text messages, but I am getting an error. Can anyone help? The error is as follows: ImportError: cannot import name 'send' from partially initialized module 'sms4' (most likely due to a circular import) (C:\Users\William Miller\AppData\Local\Programs\Python\Python39\lib\site-packages\sms4__init__.py)

sly sleet
#

full traceback?

#

and import code?

misty shell
#

I figured it out, thanks

ruby nebula
#

Not sure if this is the right channel so sorry in advance if it isnt, but im just wondering if there is a way to change the top text of a cmd window when running a python script? like can i customize what it says?

sly sleet
#

@ruby nebula

ruby nebula
#

omg wtf ur smart af thanks man

rigid sorrel
#

whats the name of that website that you can dump you program too then share the link?

#

please ping me @rigid sorrel

sly sleet
#

!paste

rancid schoonerBOT
#

Pasting large amounts of code

If your code is too long to fit in a codeblock in discord, you can paste your code here:
https://paste.pydis.com/

After pasting your code, save it by clicking the floppy disk icon in the top right, or by typing ctrl + S. After doing that, the URL should change. Copy the URL and post it here so others can see it.

sly sleet
#

@rigid sorrel

rigid sorrel
#

thanks soo much big help

valid crypt
#

Is this the right place to talk about pytest?

minor goblet
#
REPOSITORY               TAG                 IMAGE ID            CREATED             SIZE
<none>                   <none>              edabf6488d1f        41 minutes ago      131MB
<none>                   <none>              6819de49684e        49 minutes ago      496MB
youtubereactapp          latest              6077818703c5        54 minutes ago      1.25GB
node                     latest              f1974cfde44f        2 days ago          935MB
docker/getting-started   latest              67a3629d4d71        11 days ago         27.2MB
ubuntu                   16.04               dfeff22e96ae        3 weeks ago         131MB
ubuntu                   latest              d70eaf7277ea        3 weeks ago         72.9MB
PS C:\Users\starcat>


#

the lastest two images were built with
docker build . -t (imagename)
however they're not titled
any idea why?

sand thistle
#

can someone help me find out why my socket io is still attempting to run

#

even though I commented out all instances of it

muted cobalt
#

With Triage permissions in github a repository would members be able to merge their own PRs?

We want to allow them to create forks, but not directly merge PRs (private repository)

supple venture
#

so i have made a django project on pipenv environment pycharm, now i need to open a python terminal such that i can do django code with the same setup as the project

#

i found this video like that : https://youtu.be/aHC3uTkT9r8?list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p , but i am not able to do ti

In this Python Django Tutorial, we will be creating database tables for our application using Django models. We will also see how we can use the Django ORM to query the database and filter through results. Let's get started...

The code for this series can be found at:
https:/...

▶ Play video
#

i suppose am in the correct channel lemon_sweat

urban dune
#

Hello people. Question about how to setup git in ec2.

The ec2 server will be shared by multiple people, I was wondering what are some ways to setup git accounts.

Would I just have my own rsa key and other dev will also have their own rsa key? What about in git config?

main elm
#

is there anyone here who is making a software application of any sort they plan on/ are distributing? i am making a 'dashboard - in particular, a quasi-SaaS means of distrubuting softwares i.e. subscription based' as a school proj and need to product shit ton of documentation, and interviewing a prospective client would b v useful, so if I can ask you a few questions, please dm me expeditiously! ❤️

minor goblet
#

#tools-and-devops can you help me at #help-cheese ? trying to run ocropy as a docker container however i'm getting some unexpected errors. thank you.

fresh river
#

Hey @minor goblet I could help with that. I speak a little 🐋 .

#

What docker image did you build from?

It seems to me you're passing the -it args to the command - so you get an interactive shell session, and that seems to be working.

minor goblet
#

I have supplied a good amount of information in my post already. Since the image is not written well enough I am thinking I should install manually and amend the image as needed
https://hatebin.com/tujkyyestt
here is the image

fresh river
#

Okay, yeah, sorry I missed the link in your post. Content of setup.py ?

#

researching. I'll circle back.

tranquil creek
#

@minor goblet python-lxml is the python2.7 version, and python3-lxml is the python3 version. Which did you want? I'm betting that python-lxml might even be defunct now that 2.7 is EOL.

#

so if you want the python3 version, change that in your dockerfile and try again

fresh river
#

Seconded. I rebuilt the image after removing the last two lines and updated that package

...
docker build -t ocropy .
...
Successfully built 808a247ba0b8
Successfully tagged ocropy:latest
$ docker run --rm -it ocropy:latest
root@1a11ec1b5ce3:/ocropy# ls
PACKAGES  models
root@1a11ec1b5ce3:/ocropy# ls models/
en-default.pyrnn.gz  fraktur.pyrnn.gz

obsidian solstice
#

hi

heavy knot
#

Hello

#

can vscode extensions be malicious?

#

vscode is crashed

#

/:

minor goblet
#

hey everyone,
here's a list of some of the problems I've been running into as I try to set up docker containers: https://hatebin.com/vvwhykfswy
if you could take a look at this hatebin where I separated 4 issues:```# ocropy installation failure

tesseract installation failure

another ocropy install failure message

docker-ocropy empty server error```you might be able to see what is going wrong and how I can react.

i'm really new to docker so next on my list is to try running the docker image commands one at a time and making amendments to the image file, then posting my results to the github repo at which i got it...
that could be my first act as a real developer!
how about that? anyway... for the time being i'm just drinking my morning cup of coffee so if you know either how to fix these errors or manually set up a docker container i'd love it so much.
thanks

final furnace
#

Is there a way to get sidebar (not pop up) documentation in VS Code, similar to how it looks like in PyCharm?

I'm looking specifically for the sidebar, not the F12 shortcut

fresh river
rich nymph
#

Hey could someone explain the user of kubernettes or SaltStack

sly sleet
#

the only thing I know about saltstack are its past crypto bugs

sand thistle
#

uhh, i think i saw some sort of terminal extension that allowed one to see a tree of their git branches

#

or something

rich nymph
#

So here, is there a shortcut to switch between styling.css and index.html

atomic granite
#

Visual Studio code is only showing one autocomplete suggestion at a time instead of the many that it used to. Anyone know how to fix this?

rich nymph
#

@atomic granite use kite

atomic granite
#

What is that?

rich nymph
#

an auto completion engine which uses machine learning

atomic granite
#

Is it like an IDE?

rich nymph
#

no

#

it's an extension

#

in vsc

atomic granite
rich nymph
#

sure

#

it's suggestions are really good

atomic granite
#

it's suggestions are really good
@rich nymph What's sorts of suggestions does it give? Does it give them via email?

rich nymph
#

no

#

lol

#

@atomic graniteit's an auto completion engine

atomic granite
#

Yeah I know that. I'm asking: What do I get, if anything, if I link my email?

rich nymph
#

idk

#

i linked mine

#

until now i got 2 emails form kite

#

one asking for a feedback

#

and the other one was when i first installed it

atomic granite
#

ok ty

rich nymph
#

@atomic granite do u use sroucery with vsc?

atomic granite
#

@rich nymph I don't know what that is so no.

rich nymph
#

it's an exatension for python, it's really good. it gives good suggestions like

b = []
for i in range(400):
  b.append(i)

they turn this into

b = [x for x in range(400)]
atomic granite
#

@rich nymph Do you know how to turn off pro suggestions for kite?

rich nymph
#

i do not

#

why, something wrong?

atomic granite
#

Well it suggests things that I can't press enter to autocomplete I guess.

atomic granite
#

This extension is quite nice. I'm still seeing only one suggestion at a time though.

rich nymph
#

This extension is quite nice. I'm still seeing only one suggestion at a time though.
@atomic granite kite?

atomic granite
#

Yes, the problem still persists after installing kite. I think that I might have accidentally changed how many suggestions show up somehow.
For example, when I type if, it used to show a few suggestions for templates like if, if/else, and if/elif/else.

rich nymph
#

mhm

atomic granite
#

I'd like to know how to get that back.

#

I tried looking in the settings but I don't see a way to change how many suggestions show up.