#tools-and-devops

1 messages · Page 57 of 1

polar jetty
thin sphinx
#

#Term Freuency - TF-IDF
from sklearn.feature_extraction.text import TfidfVectorizer
tfidf_vectorizer = TfidfVectorizer(max_df=0.90, min_df=2, max_features=1000, stop_words='english')
tfidf = tfidf_vectorizer.fit_transform(tweet_dataset['text'])
#Count Most Frequent Words
Counter = Counter(corpus)
most_occur = Counter.most_common(10) 
print(most_occur)

sly sleet
#

wrong channel

thin sphinx
#

what channel is it then? Pretty confusing for a new user tbh. TY for the help

rich copper
#

Hey guys

#

I'm having issues with git merging

#

my colleagues work with a development branch, I work on my own

#

I just want to delete all new files on my own branch and replace it with the development branch

#

I've tried git pulling their branch and merging, but that literally just messed up files with >>>> HEAD as lines in it.

#

I do 'git checkout development' to get in the development branch , I git pull

#

I do 'git checkout trilinear-jakob' to get in my branch, then I mess up, what should be my next step?

#

if I git merge, it says it is already up to date, which is weird.

#

I tried using git reset --hard

#

but that just gives other errors

rich nymph
#

Hey could someone explain the user of kubernettes or SaltStack

heavy knot
#

Can we integrate smtplib and getpass in pycharm?

hushed orbit
#

What's the syntax for a http git remote with a PAT token in it?

#

I've tried just about all i can think of with these variables

 https://${{env.PATOWNER}}:${{secrets.GITHUBACTIONREPOKEY}}@github.com/${{ github.repository }}.git```
atomic granite
#

How can I get more than one completion suggestion to show up in VSC? It used to show more than one but now it shows 0.

ruby nebula
#

Ok so i have a bigggg text file from one of my projects that was checking usernames on a website im working on, and i was having it output the resualts into a text file just like this:
example username Is not taken
example username is taken
example username Is not taken
example username is taken
example username is taken
example username Is not taken
example username is taken

Is there a way using python or something that i can remove all the lines that have taken usernames and just have all the non taken usernames in my text file? Thanks!

sly sleet
#

just iterate thru every line

#

then check endswith("not taken\n")

ruby nebula
#

That helped thanks!

burnt nymph
#

btw when i installed python the install pip was checked

pure dome
#

hey guys, I don't know almost nothing about python, and sorry for the stupid question. I read is a script language, but how complex can I make a "script"? can I make a .exe independent software for windows in python for example? for people to use without having python installed... I read some articles and watched some videos, but these things are not clear for me. thanks

sly sleet
#

python is not just a scripting language

#

you can make large programs with it

#

and yes to your 2nd q

#

pyinstaller, etc

hushed orbit
#

@barren sigil This sounds a lot like advertisement

#

!warn 752083731988086821 Advertisement is against our rules, which you agreed to follow when joining. Don't let it happen again

rancid schoonerBOT
#

:incoming_envelope: :ok_hand: applied warning to @barren sigil.

proud trout
#

I currently have WSL enabled on Windows, and I wanted to know if you guys, whenever create a virtualenv, do you do it via cmd/powershell or wsl terminal?
Basically, do you keep your virtualenvs in the linux subsystem or on windows?

night quest
#

I treat WSL as a virtual env - like VirtualBox for example - so I keep all files in subsystem
But it could be wrong

radiant minnow
#

i am trying to make a voice recognition python code

#

so i am trying to install pyaudio

#

but whenever i try to install it it shows an error

night quest
#

Can you paste an error here?

proud trout
#

I treat WSL as a virtual env - like VirtualBox for example - so I keep all files in subsystem
But it could be wrong
@night quest do you even store your git projects in the subsystem?

night quest
#

Yep, but I am just a lazy developer, not devops 😦

proud trout
#

Currently, I have WSL only for docker containers (I guess its better than hyper V)
Another reason, I would love to use a unix shell in windows (wsl does provide that but no exactly)

night quest
#

As far as I know WSL in second version uses Hyper V under the hood - or some similar methods

#

But it's kindly offtopic

proud trout
#

is there a unix shell available for windows which integrates well with pycharm/other IDEs

night quest
#

Anyway - I think that it's nothing wrong to store code inside WSL

proud trout
#

I might consider that

#

Windows is being just mad at me, lol

#

it wants me to install microsoft visual c++ now for virtualenvs

night quest
#

Maybe you should check VS Code because there is plugin (or it's builtin) for integration with WSL

#

Give me a second to find a right video

proud trout
#

i got it into vscode tho

night quest
#

It's node application but I think that Python runs quite similar

proud trout
#

right

night quest
#

Another case that you should store everything inside WSL is that Windows can make a mess with chmod, chown and so on

proud trout
#

oh

night quest
#

But maybe someone is more experienced with that topic

proud trout
#

windows is kinda new to me, I have been a linux user for about 1-2 years

#

I think I will store my code in WSL

night quest
#

Okay 👍

#

Remember about backups! 🙂

proud trout
#

alright, thanks man!

night quest
#

Your welcome!

empty yarrow
#

Anyone who use Spyder know if there is a way to clean up the console, so it doesn't show the directories and other information, just the clean python output?

#

Alternatively, are there any editors that work like the programiz one, but just with a save button? That's literally all I need.

sly sleet
#

python version :thonk:

#

are you using the repl?

sand thistle
#

how do you guys handle ticketing

#

are there any free tools that can handle this issue

reef umbra
#

I use this and github issues -- the two of them combined solve most of my problems

vestal pier
#

does anyone know if there is a way to prevent a check from running twice on a pull request like this?

it is doing this since it is ran on [ push, pull_request ] in github actions.

wooden ibex
#

Only check once. Preferably during pull request.

distant bluff
#

hello guys, I'm new to docker and docker-compose, and I'd like some help, I don't know if what I'm doing makes complete sense, but here I go.

I have 2 apps running on the same server, each app is containerized with docker. The first app is an API, and the second is a discord bot (but that's besides the point).

I'm using postgres as a DB engine for both apps, and rather than having multiple postgres containers, I've made a single pg container for my databases. That's created with docker compose, so that I start pgadmin on the same network easily.

Now I want my apps to connect to that specific container (so I need to change each app's docker-compose.yml). I read through the docs a little and it seems that I need to use networks to achieve that (I'm not sure, I'm a total Docker noob). The question is, how do I do that ?

civic walrus
#

Hi I am having an issue with docker

hushed verge
#

Ping me

heavy knot
#

h

rancid shore
#

here this is the problem i m facing in vs code after downloadin pythion extension

#

@heavy knot

heavy knot
#

@rancid shore Do you get that when you try to install the extension?

rancid shore
#

it is working now

#

thanks qwerty

#

but i have one ,ore doubt

#

we can talk about that in general chat

rich nymph
#

who can commit to a repository?

steep fog
#

HELP !

#

i just tried to convert my app to exe file using pyinstaller
but i got this problem
as you can see, the file type is unknown or idk '-'

hushed verge
#

Can I have a setup where I have one pc hosting my bot and I can wirelessly make changes without actually going physically to my pc and changing it? I want to have one pc in my basement hosting my bot 24/7 and I can just push to GitHub with new code and the bot will update

heavy knot
olive sparrow
#

Can I have a setup where I have one pc hosting my bot and I can wirelessly make changes without actually going physically to my pc and changing it? I want to have one pc in my basement hosting my bot 24/7 and I can just push to GitHub with new code and the bot will update
@hushed verge Maybe the easiest way to accomplish this in a local network is using Jupiter Notebooks?

hushed verge
#

@olive sparrow can you link me?

heavy knot
#

does anyone know how to turn off docker buildkit in windows?

olive sparrow
#

@olive sparrow can you link me?
@hushed verge https://jupyter.org/install

hushed verge
#

How would I set it?

olive sparrow
#

If you get the jupyter notebook installed on the machine running your bot, it'll install a web server to execute python in it. That would be the jupyter notebook server.

#

so from the other computer or cellphone you can connect to that web server in your local network, go to your python file, and edit it

#

or you could configure an ssh server

#

depending on the machine you are using to run your bot, one thing would be easier than the other

#

what OS do you have installed there?

#

@hushed verge ?

hushed verge
#

I have Windows 10 running on both

olive sparrow
#

ok, then jupyter notebook would be a simple solution

#

or, you could configure an SSH server instead, but I've never done that in windows10

hushed verge
#

@olive sparrow Jupiter seems to be online but I can't run my file

olive sparrow
#

It is intended to edit your file, not run it...

#

How were you running it?

hushed verge
#

the basic python launcher @olive sparrow

olive sparrow
#

I understood that you only were looking for a method to edit your python file from another machine in your local network...

#

You should be able to do that with jupyter

hushed verge
#

Yeah but when I edit it will the code because if I want to role out an update the server is going to not have a monitor so I will need to update it via another pc

unkempt peak
#

Is there a way to convert a UTF-16 character like this: b'\xac ' to a html entity?

hushed verge
#

@olive sparrow Can Jupiter do that?

sly sleet
#

@unkempt peak first use .decode() on the bytestring then use html.escape

livid mason
#

Hey guys is there any way to host django apps with mysqlite db in gitlab?

short peak
#

I don't think GitLab offers that kind of service

heavy knot
#

anyone know why its throwing this error? go get github.com/Nhoya/gOSINT/cmd/gosint ..\go\src\gopkg.in\ns3777k\go-shodan.v2\shodan\shodan.go:15:2: code in directory C:\Users\\go\src\github.com\moul\http2curl expects import "moul.io/http2curl"

#

i am on windows btw

stark cave
#

Twice now I’ve tried committing changes to a new branch, and both times it fucked up my code.

It has something to do with stashed code. But I’m not intentionally stashing anything.

What makes GitHub GUI decide it’s going to consider a change “stashed?”
If I’m wanting to snapshot my code, as is, would I want to “bring changes” every time ?

heavy knot
#

I'm looking for a very simple solution to be able to get some stats and run basic tests on a bunch of remote hosts. So far I'm using pytest w/ paramiko and I just run simple commands to get the output and pass/fail the test. One prob I have with this is that each of my 20+ tests establish a second ssh login, otherwise it seems to work. Curious if there are any other tools or libs you guys use? This is for UNIX only.

silent sedge
#

How do I get a traceback for a non-main thread from a hanged process?

olive sparrow
#

sorry for the late reply

hushed verge
# olive sparrow yes

After some research I found that Parsec is a much more useful tool and is really easy to use

olive sparrow
#

superb, if that solves your problem, that's the good one!

heavy knot
#

Hey can we use getpass in pycharm cuz my programme can’t proceed to the line with a getpass func

sly sleet
#

@heavy knot what's your codr

heavy knot
#

I'll share it

sly sleet
#

!code

rancid schoonerBOT
#

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

sly sleet
#

@heavy knot

#

generally text is better

#

Because you can't copy paste from a screenshot and some people can't view images

heavy knot
#

import smtplib
import getpass

def sign_in():
smtp_object = smtplib.SMTP('smtp.gmail.com', 587)

while True:
    tries = 0
    useremail = input("Enter your email: ")
    password = getpass.getpass("Enter your password: ")
    try:
        smtp_object.login(useremail, password)
    except:
        # This will check for any exception and then execute this print statement
        if tries < 6:
            print("Wrong E-Mail or Password. Please enter credentials again.")
            tries += 1
        else:
            print(
                'Hmmmmm, I see that you tried one too many times. Please deactivate firewalls to permit Python to log '
                'into your account and try again.')
    
    else:
        print("Logged in successfully")
        break
sly sleet
#

did you call the function?

heavy knot
#

Yep in

#

the main code launcher

#

I made use of imports

sly sleet
#

user prompt prints?

heavy knot
#

no

sly sleet
#

bruh

#

you need to call the function

#

like sign_in()

heavy knot
#

I did

#

Like i will share now

sly sleet
#

uh I don't see any func call in your code

heavy knot
#

it's in another script

sly sleet
#

no error messages?

#

what's the other script look like

heavy knot
#

here

#

import time
from Utility.Startup import start_app
from Utility.Sign_in import sign_in

Program startup

start_app()
time.sleep(3)
sign_in()

sly sleet
#

hm what's start_app?

heavy knot
#

Hey can i talk after an hour or so

#

I got some work

sly sleet
#

k

#

just ping me

rich nymph
#

Hey so how can u run stuff of a file, in a shell in vsc.
Ik that u can do that in pycharm but how do u do it in vsc.

slender relic
#

what are the big differences between pycharm and vs?

rich nymph
#

lot, pycharm is way better than VS

slender relic
#

how

#

if I'm gonna be coding in python and c#, should I use pycharm and vs, or should I just code python in vs?

#

or maybe even vs and vsc?

trim granite
#

@slender relic you can run both python and c# programs in vs code simple download .Net core and python compiler. install the recommended extensions for both c# & python.

Finally install a code runner plugin and you're good to go.

slender relic
#

i dont want to code c# in vsc though

trim granite
#

Then i think pycharm & vs would be good.

slender relic
#

ok thanks

trim granite
#

Anytime

rich nymph
sly sleet
#

@rich nymph vscode >>> pycharm don't flame me

#

there should be a keyboard shortcut

rich nymph
#

@sly sleet i haven't tried pycharm so i wouldn't know

sly sleet
#

oh wait vs

rich nymph
#

i am using vsc

sly sleet
rich nymph
#

oh that's aight

sly sleet
#

but uh yeah vsc python has a keyboard shortcut to run in shell

#

idk what it is because i changed it

rich nymph
#

oh

#

where did u change it?

sly sleet
#

i think ctrl k ctrl s to get into keyboard shortcuts

#

then search python run

rich nymph
#

cause what i am currently doing is that i am importing the file in shell and then doing the sutf there which is a lot of work

sly sleet
#

does it have to be within the repl?

#

because you can click the green run button at top right to run normally

rich nymph
#

it has to be in a repl to check certain stuff

#

i won't run it in repl

#

just to check certain stuff

sly sleet
#

hmm

trim granite
sly sleet
#

the closest you can get is run selection/line in python terminal

trim granite
#

I'm getting this error

sly sleet
#

python3 script.py

#

assuming you're using py3

trim granite
#

I've tried that as well but still i'm getting this

rich nymph
sly sleet
#

oh yeah that feature

#

i was just looking at it

#

to see if it could solve your problem

#

@trim granite the same error?

#

did you install python3 from apt

trim granite
#

@sly sleet no

#

I think it by default ships with ubuntu

sly sleet
#

just check

trim granite
#

@sly sleet o gotcha

#

Python is not installed in my machine

#

@sly sleet it worked thanks

scarlet leaf
heavy knot
#

Not sure if this goes here but i'm trying to create "something"

#

The thing is, it won't work.

#
from configparser import ConfigParser
import robloxpy

config = ConfigParser()

config.read("config.ini")

cookie = config["Main"]["Cookie"]

cookie_check = robloxpy.CheckCookie(cookie)

print(cookie_check)
#

For some reason it doesn't work

heavy knot
#

Hello I need help with an autosave feature in my text game If anyone would like to help me please message me thank you

mortal kelp
#

In pyproject.toml I have something like this:

[tool.poetry]
packages = [
  {include = "main_package"},
  {include = "extra/package"}
]

[tool.poetry.extras]
extra = ["package-required-by-extra-package"]

How do I make poetry only build extra/package package if extra option is specified?

analog kettle
#

I'm setting up a PyCharm project that lives in a subdirectory of a larger git repo

#

but I want it to use the same .git folder as the whole project

opaque kettle
#

my pycharm mypy just suddenly stopped working, which I mean is great cause I went from ~60 errors to none..

#

anyone know what caused it/how to fix?

brazen venture
#

I want to get some perspective on how bad it would be to build a django based frontend for a devops tool. The tool is similar to ansible and manages servers for hosting. Right now I login via SSH to perform any actions but I need some way to let others login.

tranquil creek
#

Sounds dangerous.

Are there no other tools that exist that you can leverage instead of rolling your own and missing out on all the bug fixes / security fixes that other free, open source tools would have already figured out for you?

opaque kettle
sly sleet
#

also, you need to define what "doesn't work" means

surreal lintel
#

What do people prefer for Python, vsc or Pycharm?

#

I have used vsc for Javascript so I am wondering if I should just continue on vsc or install Pycharm as well

proud trout
#

I use vscode for small scripts, non github projects or those which involve a lot of frontend (html, css and js), like django projects.

#

pycharm, on the other hand, I use it for git projects, just to get the nice interface for version control and also the pycharm allows you to run individual tests from the editor which vscode does not provide

#

if you are running on a potato machine, pycharm can be really slow and you might want to stick to vscode

sly sleet
#

vscode git interface is nice

rich nymph
muted cobalt
#

Anyone tried getting pycharms linter to work with automaticly generated init methods?
Everything appears as unexpected arguments, though the code runs fine

#

Just wondering if there's a way to fix it

#

without you know, manually defining the _init_ method for each Model instance

dusty maple
#

How are the __init__ methods generated exactly?

muted cobalt
#
def gen__init__(columns: List[Column]):
    def __init__(self, **kwargs):
        missing = []
        for col in columns:
            try:
                val = kwargs[col.name]
            except KeyError:
                if col.default is None and not col.nullable:
                    missing.append(col)
                    continue

                val = col.default

            setattr(self, col.name, val)

        if missing:
            raise TypeError("__init__() missing {0} required positional arguments: {1}".format(
                len(missing), format_missing(missing)
            ))

    __init__.__annotations__ = {
        c.name: c.column_type.python for c in columns
    }
    return __init__

This is the function that makes it

#

Here is the class it's used in ```py
class ModelMeta(type):
def new(mcs, name: str, parents, data: dict, **kwargs):
columns = []

    data["__tablename__"] = tablename = kwargs.get("table_name", name.lower())

    for key, value in data.items():
        if isinstance(value, Column):
            if value.name is None:
                value.name = key

            if value.index:
                value.index_name = "%s_%s_idx" % (tablename, value.name)

            columns.append(value)

    data["columns"] = columns
    data["__init__"] = gen__init__(columns=columns)
    return super().__new__(mcs, name, parents, data)
dusty maple
#

@muted cobalt afaik, PyCharm only ever does static analysis of your code and doesn't check for anything at runtime

#

Those stubs are also read by other tools like flake8 or mypy so you'd benefit from that as well

muted cobalt
#

This seems like alot of work for external contributors to go through 😅

#

I'm not even sure how this would work myself

dusty maple
#

Yeah, that's a fair consideration

limpid carbon
ripe belfry
#

Hi there, I want to configure my pycharm run & debug with docker environment. Anyone have any idea how to do this ?

raw stream
#

hi

night quest
ripe belfry
ripe belfry
grave summit
#

does anyone use SKLEARN here?

stark cave
#

i haven't made a branch in >14 days. i want to make a new branch, based on my local repo as-is

#

does it matter which one i pick?

brisk dirge
#

@stark cave if by "local repo as-is" you mean "the current state of the files on my local disk", then I think you want the second option. "The currently checked out branch" is what you have on disk right now.

stark cave
#

Thanks man 🤩

stark cave
#

bring?

brisk dirge
#

@stark cave that you means you have changes on your local disk that haven't been committed - if you want those changes to be part of your new branch, choose the second option

heavy knot
#

hey

#

m kinda new to visual studio code, can anyone just tell me the setup, i mean before running the code, we need to install the extension and do some stuff, but i am not clear about that, so if somebody could help

rich nymph
heavy knot
#

but what next? @rich nymph

rich nymph
#

now u riun the code

heavy knot
rich nymph
#

how are u runnning the file?

heavy knot
rich nymph
#

try running the file through the terminal

#

also could u send the entire screenshot of u runnign the file

heavy knot
#

oh ok

#

@rich nymph what now?

rich nymph
#

are u on windows?

heavy knot
#

yep

rich nymph
#

also @heavy knot u revelaed your token change that

rich nymph
heavy knot
#

@rich nymph thanks, i didnt realised

#

ok

rich nymph
#

so did it work?

heavy knot
#

nope

#

@rich nymph is it?

rich nymph
#

ignore that

#

those are warnigns

#

show me u running the file

heavy knot
rich nymph
#

u are running it through a jaascript thing

#

just trash all of those, using the trash button. Start a new terminal and type the name of the file it will run

heavy knot
rich nymph
#

u are doing it wrong

#

so first trash all of the open terminals.
And then press CTR + ` ANd then type the name of your file

heavy knot
#

ok

#

@rich nymph so do i have to add the location path also?

rich nymph
#

no

heavy knot
#

in terminal

rich nymph
#

just open up the terminal and type the name of the file,

#

but this will only work if you are in a workspace, meaning if you have a folder open

heavy knot
#

oh

#

@rich nymph

#

i didnt expected that window, ever happened to you?

rich nymph
#

huh

#

coul u tell me what u did

heavy knot
#

okay okay

rich nymph
#

and what happened

heavy knot
rich nymph
#

are u running the file from the terminal?

heavy knot
heavy knot
#

@rich nymph can you send me a screenshot while running the file, maybe i can relate with it

rich nymph
#

here u go

heavy knot
#

ok

heavy knot
rich nymph
#

np

muted cobalt
#

Anyone tried getting pycharms linter to work with automatically generated _init_ methods?
Everything appears as unexpected arguments, though the code runs fine

#

I see that it works fine for models created with SQLALchemy, but I'm not sure how they managed to get it to work

stable olive
#

Hlo

#

i am a biggner and i have a dout that what are github

#

plz some one anwer me

#

answer me

#

i am confused

#

what are github and what are there uses for a devloper

#

?

night quest
#

Hey hey, easy

#

GItHub in a nutshell is service to share code

#

You can share your project, collaborate with other people and so on

stable olive
#

can we use github as a cloud to save our source code

#

and can we acess it

night quest
#

You can store your code in GitHub

stable olive
#

ok thank

#

can i ask one more question

night quest
#

Ofc

#

I am listening

stable olive
#

i am using pycharm comunity edition interpreter and its just best, but the problem is that it takes much more RAM and i have a laptop with 4GB RAM . so , is there any soloution for that?

night quest
stable olive
#

tnx

wooden ibex
#

Abhinav not easily. All of Jetbrains products are RAM 🐷 and they just expect you to have hardware to run them.

sly sleet
#

use vscode /s

arctic flicker
#

So I'm having a terrible time with PyCharm - it keeps running in normal mode when debugging, and for no apparent reason

rich nymph
gloomy pike
#

Hello, folks! Ansible question here.
I have multiple machines a,b,c that are accessible via public network each of those machines has access to internal network (lan). A, b, c have separate Lans and on each of those Lans there is a machine with ip 10.0.0.1 that i want to access. How can I do that?
My end goal is to run ansible playboy once that does this.

  1. creates a file on a, b, c then log into 10.0.0.1 on each of their Lans and create a different file there.
frail tundra
#

I have some issues with vs code and venv after I reinstalled windows, I am sure it worked much smoother before. I had to add a command line argument for powershell so the venv get activated at all and I have to open a new terminal for the activation to take effect, pretty sure I didnt had to do any of this before.

quick hazel
#

i use logo_vscode and logo_atom and logo_vim and logo_neovim and logo_idle

heavy knot
#

why does "discord" get that underline, whilst not giving an error?

spark falcon
#

why are you printing discord?

true shore
shadow crow
#

Has anyone had issues with Sphinx in VSCode? I specified all the paths in the settings and I enabled the autodoc extension. It works, but VSCode is saying:

(INFO/1) No directive entry for "automodule" in module "docutils.parsers.rst.languages.en".
on this code:

.. automodule:: lib
   :members:
sly sleet
#

@heavy knot what message appears when hovering over it

azure lichen
#

Hey folks.

My local instance of Code OSS recently stopped listing the python interpreters available on my machine in the Ctrl + Shift + P > Select Interpreter Menu.

Anyone experience this before? The status bar has also stopped showing the selected interpreter 🤔

analog kettle
#

git stash is what I would do if I want to save some changes in progress that aren't ready to commit yet, yes?

rough marlin
#

@analog kettle yes

#

git stash pop to retrieve them off of the pop stack

#

i think you can also git stash list

#

check the doc for how to use git stash, i'm unsure of it at the moment

#

I also have a bit of an odd git question.

#

On some of my local repo copies, everything works fine

#

on one of them, attempting to git fetch fails

#
b.com```
#

the other git repos are hosted on github

#

so i have no idea what the problem is

neon jungle
#

it's not able to connect to github

#

I keep having issues now when trying to open ipynb files in vscode

#

it worked yesterday but now i get this error

Unable to open 'file.ipynb': Using the Jupyter notebook editor requires the stable version of VS code and the CustomEditor experiment to be enabled..```
#

actually i did more research into it and i found a gh issue opened 5 days ago about it and a pr that was just merged 8 hours ago lol

#

seems to have been a result of a vscode update

#

since the pr was just merged there will probably be a bug fix update fixing it soon

short peak
#

figured it out, it's actually fn key

candid kayak
#

@muted cobalt I don't really know a lot about this, but https://youtrack.jetbrains.com/issue/PY-38400 seems to suggest that the bug is fixed in v2020.1. Other threads like this with similar errors also say they've been fixed in never versions, so try updating pycharm? sorry I don't have a lot of helpful info here 😅

muted cobalt
#

Using their example code seems to have worked fine at least

#

But not with mine.

leaden tartan
#

Was looking at a docker-compose.yml and found this in the volumes section. What does the :Z at the end mean?

heavy knot
#

you have to pip install it

#

it doesnt give me an error and i've already installed it

sly sleet
#

is your python interpreter set in the bottom left?

heavy knot
#

@sly sleet

sly sleet
#

hm that looks right

#

you only have 1 python version?

heavy knot
#

i think so

#

do i need 2?

#

@bitter vigil

#

show the full vscode terminal when you press run

sly sleet
#

@heavy knot no, one python version only is good

#

makes debugging these issues easier

heavy knot
fresh wharf
#

im trying to use nuitka. the whole works 'fine' until I try to use the resulting .exe and there is a lib missing at runtime. is anyone familiar with nuitka. I don't have a whole lot of experience with python in general

heavy knot
#

thats not the terminal you are on the output tab

mild lance
#

Hey guys. I have a git submodule that I made some changes to. I can I push the changes of the submodule to its remote repository?

mild lance
#

I think I messed something up by pushing to the parent repo before the submodules.

#

I'm able to push with git push origin HEAD:master

#

but, that doesnt seem right

smoky compass
#

Does anyone have a preferred style/system for documenting fields, required/optional, choices, etc for JSON/YAML format files?

wooden ibex
#

YAML supports comments natively

#

For JSON, maybe look into example JSON file with comment field?

smoky compass
#

Hmm

#

I have a schema defined in Marshmallow and was hoping there might be an easy way to generate some human-readable documentation of the schema

#

Am open to switching to another mainstream schema library such as pydantic if the support is better

real harbor
#

does anyone know if it's possible to get vscode to recognize typing.ForwardRef ? I'd like code completion without actually importing the module due to circular dependencies

dusty maple
#

I use it with from __future__ import annotations as well so I can write the types without making them forward references for recursive type hints

real harbor
#

ok cool ill try that out, thanks

final furnace
#

Is there a linter / code formatter that does something like this:

Notice how the is_3, float(), and mean() are lined up

accuracy_3s =      is_3(valid_3_tens).float() .mean()
accuracy_7s = (1 - is_3(valid_7_tens).float()).mean()
faint turret
#

Hi ... does anony one here know how to setup virtual env for M1 MacBooks ?

wispy heath
#

hi whoever knows python pretty well please help me

#

please ping me if so

sly sleet
#

@wispy heath this is the python discord

#

many people are able to answer your questions

#

if you actually ask them

faint turret
#

when you create a virtualenv where does it actually go (ie what folder, macOS) ?

dusty maple
#

If you create it through venv or virtualenv it gets created at the directory the you specify it to

faint turret
#

i didnt specify a folder

#

i ran: python3 -m venv test_env1

dusty maple
#

You did, it's test_env1 of your current working directory when you ran that command

faint turret
#

lol got it

rough marlin
heavy knot
#

karakterer = { "Steffen": 1, "Frank": 6, "Tobias": 4, "Finn": 3, "Jakob": 2, "Jens": 5, "Olivia": 2, "Mathias": 6, "Bo": 4, "Kent": 1, "Ronny": 1, "Kentare": 1, "Finnkjetil": 1, "Tore": 1, "Tormod": 1 }
Now I want to add a surname: Like Steffen Frogh
And people can do siether: Steffen, Frogh or Steffen Frogh
And it will still print the number

indigo stirrup
#

I'm trying to setup a GitHub Actions workflow to make an installer of my Python app.
I've go the .yml file set up but I'm having some difficulties understanding how correctly trigger it.
I'm working with a master branch and a dev branch: me and the other programmer that are working on the project each create new branches from the dev one for every feature we work on and we then merge those into it when done. We can't push to master directly, Pull Request from dev is the only way to commit changes to it.
Ideally I would like to run the Action on push to master (which I know how to achieve) but only if the merge is tagged. The second part is the one which is confusing me: is it possible to tag the merge commit from a PR?

neon jungle
wispy inlet
#

I have a docker container that is not including the port on a redirect uri (django). Is there some setting i might be missing that would include the port?

heavy knot
#

After a few weeks of crippling pain working with pipenv, does someone have experience with other tools for dependency management? Poetry seems interesting

scarlet leaf
#

how does flake8 determine the order of imports

heavy knot
#

how can you run a python file in atom, i have installed the script that is runs the code, but it isnt works

heavy knot
#

This is just a screenshot of everything

heavy knot
#

Hello can someone give me a quick help?
how can i get this link to the answer to my request?

vapid fiber
#

Hey. Has somebody used AWS step functions for Neural Networks?

#

For deployment

opaque yarrow
#

hey how can i install kivy in py 3.9 version

rough marlin
rough marlin
rough marlin
opaque yarrow
#

@rough marlin it did't work

light ridge
#

Not sure if this is the right place, but im making a simple bot for a offline/singleplayer game and im trying to find a bit of code to find a pixel within a certain region on the screen. Im using pyautogui library. Could someone direct me to some good knowledge there 🙂

minor goblet
#

command to remove this container?
f831b244a1531878be0f8e230e81fb2e6e858a262aa055d9107069189a2b82a3

minor goblet
#

docker rm

night quest
#

You can prune too: docker container prune

restive wren
#

newbie here
is there any good text editor like pycharm but for browser?
pls ping while answering

heavy knot
#

@restive wren Have you taken a look at our tools page?

#

!tools

rancid schoonerBOT
#
Tools

The Tools page on our website contains a couple of the most popular tools for programming in Python.

heavy knot
#

Youll notice "repl-it" on it

restive wren
#

ohh thanks:)

restive wren
#

@heavy knot omg thanks so much my bot is online now, it wasnt working withother softwares this one works

heavy knot
#

:D

heavy knot
#

Any reccomendations for a free IDE for web development with django that runs well on linux?

scarlet leaf
#

you could try vscode

#

i'm typing this on PopOS

#

and I mainly use vscode

heavy knot
#

Hi

heavy knot
#

Looking for a way to receive a message on my phone when a block of code executes is there a tool for that?

warm pagoda
#

is there a command I can place at the end of my scripts that when I run them in vsc, and the script finishes, it will auto stop the console and script from running? Like basically I run my script, at the end of the script is like a 30 second timer, and when that timer finishes, it will stop the script from running (system monitor) and it will close the console in vsc so that I don't have to keep opening my system monitor to close the many python events running that never seem to close after I hit the red square to stop the script, and the trashcan Icon on the terminal to close it?

warm pagoda
shy cipher
#

hr

#

hrhh

rancid schoonerBOT
#

:x: According to my records, this user already has a mute infraction. See infraction #22022.

#

:incoming_envelope: :ok_hand: applied mute to @shy cipher until 2020-11-29 16:02 (9 minutes and 59 seconds) (reason: burst rule: sent 8 messages in 10s).

thorny helm
#

help, i have python 3.9 but i need an older version for tensorflow, so i downloaded anaconda to set up a virtual environment with 3.7 to open in jupyter notebook, but despite it listing the environment i created as a kernel and me choosing it, the python_version() returns 3.9 and it seems like it's using the default kernel for some reason

#

importing tensorflow returns a modulenotfound error, meanwhile in anaconda in the environment i created it lists tensorflow as installed

#

does anyone know what's happening?

wooden wolf
#

Anyone use vim?

#

@grizzled pine you dont understand do you u windows using microsoft edge worshipping programmer that GOD TALKS YOU HAVE NO CHOICE

atomic mist
summer oak
#

Hey guys

#

what's the difference between sublime text and vsc ?

sly sleet
#

@heavy knot you need to add <python_installation_folder>/Scripts to PATH

#

@heavy knot you can send text messages by emailing special email addresses which depend on your provider

wooden wolf
#

@summer oak use vim

night quest
#

How can I host my own PyPI as a mirror of original one with my packages?

heavy knot
#

@sly sleet do you know what that is called?

spice kayak
night quest
#

Currenty I am using git submodules but it's not clean solution

spice kayak
#

have you useed setup tools? or maybe create just setup py

#

i think that deploy and maintenance a pypi will be much more work

night quest
#

I have setup.py in my packages 🙂 But currently I am installing them by iterating in deps/ directory like cd deps/foo/; pyton setup.py install; cd ../bar/; python3 setup.py install

#

I prefer to list packages in requirements.txt and do all the magic behind pip install -r requirements.txt

#

I cannot publish my packages to official PyPI because of company requirements but installing every module manually, writing instructions and so on is to much effort for me

#

I want to find solution such as simple Docker container with my own PyPI server and cronjobs to recreate packages daily from git repos

#

Alternatively git hooks are nice options too to rebuild packages in PyPI

spice kayak
#

ummm , maybe add another repo but just for your packages

#

i donk use git hook so i cannt tel

steel ocean
#

Have you looked at nexus?
That's your own pypi

#

And you probably push from a fit hook, might be easier to setup in a release pipeline

night quest
steel ocean
night quest
#

I have tried devpi but it's too complicated to just add new packages for me

night quest
steel ocean
#

I never had to set it up, but my employer uses it a lot

night quest
#

Okay, thanks again

sly sleet
#

can't you just do pip install git+https://some git repo ?

#

@night quest

night quest
sly sleet
#

idk if that works with private repos though

#

you can try it

#

and you can add those to reqs.txt too

night quest
#

I will check it out, thanks!

sly sleet
wooden ibex
#

that being said, those gateways still work but being cracked down on by providers

#

so I wouldn't rely on them for anything critical

lilac beacon
#

I have a couple of printers setup at work on the same print server, when one printer goes down, we can just change the port of the faulty printer (in print management) to another one and the printing job continues. I'm looking to change port not add or delete, which libraries or modules should I start exploring to find the answer?

wooden ibex
#

PrintManagement

faint turret
#

Anyone know how to specify a particular python interpreter when creating a virtualenv using virtualenv ?

#

When using: virtualenv --python=/usr/bin/python3 ./venv_app
i get the following error:
bad interpreter: /Library/Developer/CommandLineTools/usr/bin/python3: no such file or directory

#

but im not even trying to point to that folder

#

it was working on Friday and then I installed Xcode and it stopped working.

muted notch
#

Is it just me or does this block of code seem wrong according to ecs.client.waiter docs? Says maxAttemps is set to 100 and error is returned after 100 failed checks, MaxAttempt=200 seems counter intuitive or am i missing something?
https://boto3.amazonaws.com/v1/documentation/api/1.9.42/reference/services/ecs.html#ECS.Waiter.TasksStopped

# If we don't wait, we return here.
        # This will skip the waiter
        if not self.wait:
            return True

        waiter = self.client.get_waiter("tasks_stopped")

        # Wait for task completion
        waiter.wait(
            cluster=cluster,
            tasks=[
                task_arn
            ],
            # NB: max timeout is 600 seconds
            WaiterConfig=dict(
                Delay=10,
                MaxAttempts=200,
            ),
        )```
heavy knot
#

What would be the best way to setup an authentication system for my python bot?

mortal ocean
#

Is it possible to run exe files from auto-py-to-exe on other windows 10 computers?

rancid schoonerBOT
#

:incoming_envelope: :ok_hand: applied mute to @stoic galleon until 2020-11-30 09:43 (9 minutes and 59 seconds) (reason: burst rule: sent 8 messages in 10s).

tiny acorn
#

Anybody on dooms-emacs ?

clear mountain
#

Write a function all(lst) that models a limited version of the behaviour of the built-in function. You may
use the built-in function bool().
Input: a sequence (list) of objects lst.
Output: a boolean, True if all objects in lst have a truth value of True; otherwise False.

frozen wagon
#
too many indices for array: array is 0-dimensional, but 1 were indexed
#

predicted is a list, i need it to be an array to process it

sly sleet
#

!rule 5

rancid schoonerBOT
#

5. Do not provide or request help on projects that may break laws, breach terms of services, be considered malicious or inappropriate. Do not help with ongoing exams. Do not provide or request solutions for graded assignments, although general guidance is okay.

sly sleet
#

@clear mountain

compact violet
#

i made this search open but when i run this it will show only 1 result but in db there were multiple values currospodence to searched value

foggy yacht
#

because ur doing fetchone()

#

do fetchall()

#

and iterate through the values

#

@compact violet

proper lion
#

Hey, just looking for general advice... I have an application that's going to run on a Raspberry Pi with PiCore, that needs to log some of the data it records as 'lifetime' statistics. I'm using PiCore because power could be cut at any time, unpredictably, but there's a small chance that would corrupt the statistics log file if it happens while it's being written... I need to make that a 0% chance.

What do you guys think of this strategy; setup a rotating series of log files, after writing to each file check and store the hash and datetime in a 2nd file, and then when I need to retrieve these data after reset pick the most recent log with a valid hash?

wooden ibex
#

Sqlite is ACID compliant

#

So it’s pretty rock solid, if it can’t save your data, likely nothing else can.

proper lion
#

ACID compliant TIL. Thanks, I'll check it out!

compact violet
#

@foggy yacht I'll do that but not works

rare mirage
#

Hello!

#

A very simple question about github

#

I have my account and I make a lot of commits into private repositories

#

Thing is, the green boxes don't show to the public when it's about a private repository

#

But I saw people that could show how many commits they did to a private repository publicly

#

Anyone knows how to do that?

#

Thank you very much beforehand :)

#

I click on 16 October, and it shows that

#

It clearly counts the private repositories contributions

#

On the other hand, you got my account and think I did nothing throughout half of the year :(

rare mirage
#

Thank you very much!! Just did sight read that page quickly and didnt find it xD

night quest
#

It's why I am using CTRL+F always when I need to find something 😂

rare mirage
#

I almost always do that LOL, except this time - god damn it!

eager owl
#

Stupid git question, but never thought of it:

if I use /* in my top level .gitignore, will that also ignore the .git/ folder and screw up my repo?

#

I'm trying to change my gitignores in my repos to be whitelists rather than blacklists, as in previously I'd specifically ignore certainly files and folders, whereas now I'm trying to ignore everything from the start and specifically whitelist the relevant files/folders

#

logically my brain tells my that git should ignore the .git folder anyway

#

..otherwise each commit will produce a change that needs to be recommited

#

ad infinitum

night quest
#

@eager owl

$ cd (mktemp -d)
$ git init
Initialized empty Git repository in /tmp/tmp.vTpg7KZbbk/.git/
$ echo "*" > .gitignore
$ git add .gitignore
$ git commit -m "Initial commit"
[master (root-commit) 2fbbb63] Initial commit
 1 file changed, 1 insertion(+)
 create mode 100644 .gitignore
$ touch test
$ git status
On branch master
nothing to commit, working tree clean
$ git add -f test
$ git status
On branch master
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
    nowy plik:     test
#

It's that simple

#

If you don't know how it works just test it

#

It seems that .git directory has nothing to .gitignore becuse you don't put .git directory as git object

#

But ignoring everything by default looks oddly

eager owl
#

ok great cheers

analog kettle
#

Do any Windows users know of a terminal more reliable than gitbash? I'm thinking of switching over to powershell because gitbash sometimes behaves unpredictably. Like it won't use packages in my virtual environment when I execute Python code or will forget what ls is when I deactivate an environment.

analog kettle
short peak
#

I used Windows for a year and I had to use a different per purpose. gitbash for git. powershell for docker commands and WSL for kubernetes commands

#

it was really painful to try to use all of them in a single one

analog kettle
#

yeah, that's what I'm running into @short peak

#

I'm going to dual boot my next computer

short peak
#

not sure if WSL2 improves that. I used version 1

analog kettle
#

and the Windows partition will just be Steam, basically

short peak
#

oh I decided to go ubuntu and void suffering

night quest
short peak
#

is it available for everyone already or still needs to be something insider?

night quest
#

As far as I know it's available till previous update

#

But I cannot use it 😂

#

WSL2 requires some options that crashes VirtualBox

#

If you are VMWare user it shouldn't be a problem

wooden ibex
#

@analog kettle powershell is superior shell. Period

wooden ibex
#

Because it’s object oriented, has standard for commands and easy to extend

#

It’s also got modules for just about everything at this point

#

Plus you get access to .Net standard libraries if you must

#

Only thing that comes close is python and it’s easier to use for command line operations then Python since arguments are native

short peak
#

perhaps has a better design but it's common that simple tasks to do in bash are way longer and complex in Powershell

wooden ibex
#

Maybe but I find that’s mostly false

#

Doesn’t change you should be scripting and not using command line a ton so bash being “simple” is not a great argument to continue to use less capable shell

short peak
#

if I wanted to "script" instead of "automate" commands I'd use Python

wooden ibex
#

Or do both with same shell

short peak
#

yeah, not sure. Mixing technologies is not a big issue for me I guess

wooden ibex
#

Not to mention Powershell has a ton of built in commands for common scripting asks

#

Invoke-RestMethod vs request.post()

#

Import-CSV

short peak
#

yeah, it has a lot of functionality. Perhaps it needs a better documentation oriented to bash users. Like, how to do this "common in bash" in Powershell. I can't recall all the scenarios but I remember that every time I needed something I had to search a lot

wooden ibex
#

I mean it already aliases most of common bash commands

#

Problem I find with just bash -> Powershell is bash is all string based and Powershell is not

#

It’s like trying to drag someone from Basic to Python by writing some guide, sorry new language with more power, it’s hard to hide all that power without massive crippling.

short peak
#

I see your point

#

so why do you think Powershell hasn't been adopted by default in app/systems? or at least I haven't noticed it

#

I try to do both versions but it's common that you only find .sh files in apps and that you need to install Powershell in Linux systems. Has any distribution adopted it as default or is that even possible?

wooden ibex
#

Because legacy

#

It’s available as snap for Ubuntu

short peak
#

yeah, I use it. It's also in brew for mac

wooden ibex
#

Yep, but if it was made a default shell, it would break so much

proper lion
#

@wooden ibex Thanks for the advice about sqlite yesterday btw! Just tested my rolling database and it works flawlessly.

#

I was totally going to reinvent the wheel >.>

sly sleet
#

@wooden ibex tbh idt powershell is a bad language

#

its just way too verbose

#

shells aren't designed for actual programming

#

and instead for interactive use

#

idt powershell will ever become a default shell

#

because its way too different from posixy shells

waxen flint
#

Also, Windows is trying to integrate more into WSL, Their latest Development on the Windows Terminal tries to integrate any shell (Inc. CloudShell).
https://github.com/microsoft/terminal

GitHub

The new Windows Terminal and the original Windows console host, all in the same place! - microsoft/terminal

small pulsar
#

Should I use Mu or go straight to PyCharm? Where does VS code come in I read that? it is not as good on as Pycharm for python which is it?

magic bane
#

Hi guys, ive been trying to install VS code Via the Linux app installer, But i seem to get an error!

#

Alright, I own a Lenovo C330, and I think it runs 32 bit, but I'm not 100% sure, so I went on the official Visual Studio code website, and I installed the latest .deb (Debian) version of VS Code, I open my file folder, right-click on the file, and it only lasts a good one and half-second before I get an error message stating there has been an error and I am unable to install VS Code.

#

I already have it on my Windows PC, I just think having on my laptop for on the go would be nice.

#

Please ping me If you have a response, Thanks

rotund cedar
#

hello

#

i need help to use twitter api

#

i am new her and i don't know wich channel i supposed to post this

night quest
rotund cedar
#

(i allready have the api)

night quest
#

Do you have API key?

rotund cedar
#

yes

night quest
#

Then use api.getUser

rotund cedar
#

ok. thank u. i will read those

night quest
#

I don't have API key to check it on my own

rotund cedar
#

no probelm. to my first python app, i wanna make a social network wallboard

#

just to discover this language

spark onyx
#

hello , sorry for disturbing u guys i have a question ? Did you know something that can navigate into webpages like click or acting like if it was watching a video but without really opening a webbrower

#

i mean as a background process

wooden ibex
#

Look at Selenium

#

Note, it’s not an easy library to use

heavy knot
#

Hey

#

you guys know that sort of shortcut in vs code where you type ! in an html template

#

and then you type tab or enter

#

and you get a base template

#

It for some reason doesn't work for me anymore. How do i enable it?

heavy knot
#

something like code completion

ebon spire
#

does anyone knows a library/package for visualizing recursive function?

leaden tartan
# spark onyx i mean as a background process

Selenium can run Google chrome in headless mode so that might be what you need. As rabbit said, its somewhat difficult to use. Look into Helium which is built on top of selenium.

heavy knot
#

ERROR: Could not find a version that satisfies the requirement json
ERROR: No matching distribution found for json

#

need help to fix this

ocean needle
#

how do i start with python on vscode

sly sleet
#

@drifting hedge you dont need to pip install json

#

its already in the stdlib

lost dust
#
def cake():
    if False:
        print("hey")
    x = u
    z = NonExistant("hey")

how come PyCharm linter dies and can't report Unresolved reference error if I do this?
False is actually __debug__

#

I mean in practise the code below the if will run, but the Unresolved reference error is not reported peterthink

rotund cedar
#

hello

#

i am trying to use instagramy tool (https://github.com/yogeshwaran01/instagramy/tree/master/instagramy), when i try to use it i have an error:

File "rs_i.py", line 6, in <module>
user = InstagramUser('github')
File "/home/louis/.local/lib/python3.8/site-packages/instagramy/InstagramUser.py", line 32, in init
if check_username(username):
File "/home/louis/.local/lib/python3.8/site-packages/instagramy/InstagramChecks.py", line 26, in check_username
token = response.cookies["csrftoken"]
File "/usr/lib/python3/dist-packages/requests/cookies.py", line 328, in getitem
return self._find_no_duplicates(name)
File "/usr/lib/python3/dist-packages/requests/cookies.py", line 399, in _find_no_duplicates
raise KeyError('name=%r, domain=%r, path=%r' % (name, domain, path))
KeyError: "name='csrftoken', domain=None, path=None"

is anybody have an idea ?

lone aurora
#

Anyone have a Docker django, channels, redis, postgres configuration available?

rich kiln
#

guys anyone here is good at developing augmented reality app??

stone surge
#

has anyone used PyUpdater? what kind of host should i use for storing the update files? i know nothing about web stuff

heavy knot
#

Hi, i dont know too much about python and when I try to change my archive from .py to .exe with PyInstaller it give me an error. Can i send to any one the archive and you change it to .exe pls? Thanks

lethal marlin
#

hi anyone knows bs4 and selenium?
I can't extract data from one website, bs4 doesn't prettify whole document, I cannot get certain divs, they are sent to website via JS need help

undone warren
#

hello. A bit beside the focus on this channel, but anyone familiar with kubernetes? I have a service that needs to run at host network level, but I want an ingress for it. How would I do that?

twin hull
#

Has someone some experience with pyre-check? What are the pros and cons over mypy?

mighty wigeon
#

how to auto format python code with neovim?

tiny hamlet
#

Has someone delved into the rabbit hole of dependency management, packaging and cross platform python installations and came back alive to tell the tale? I'm at my wits end at work trying to figure out a bullet proof way - that's quick, easy and out of the way - to have all our python code running on multiple machines.

#

So far I've looked into and used: setup.py, pip with a private pypi, pipenv, poetry, twine, dephell... Also homebrew vs pyenv and what to install with pip at what point to which version. Tried custom mingw, cygwin and git bash on windows. The platforms I use are windows and macos. Also scoop, choco and something else on windows.

#

venv, virtualenvwrapper...

#

In my case, on macos, the safest bet (iirc) was to install pyenv with homebrew, install python3 with pyenv and then work only-and-exclusively with virtualized envs - usually with pipenv.

However, pipenv gets tiresome when you're shuffling around in and out of folders and don't want to install stuff systemwide. Then someone goes and does a pip install this-and-that and it gets forgotten for a month or more. It just so happens, that what they pip-installed conflicts with some new projects dependencies inside a pipenv venv, and the developer flips over the table. Fast forward to a discussion about "npm never has these issues"

I can't argue - it looks tempting to have npm install -g in the readme vs my longwinding step-by-step instructions..

#

Any long arching articles (not just how to use pipenv etc, but rather how to make all of this work) or such material to study would be appreciated. Also any experiences or questions that might provoke that typical "oh yeah, why am I doing it that way.. true.."

tiny hamlet
wooden ibex
#

@tiny hamlet Docker it?

#

that's what most people do and docker runs on all platforms

slim flame
#

Any guide to make python wheels for a armv7l linux?

viral sky
#

im having trouble getting mypy to recognize the type hints in a package when it's installed and imported elsewhere. I found this:

https://www.python.org/dev/peps/pep-0561/

This PEP does not support distributing typing information as part of module-only distributions. The code should be refactored into a package-based distribution and indicate that the package supports typing as described above.

can someone clarify here: does this mean that it won't work if my package is just

foo.py
test_foo.py
... # other files like setup.py etc
py.typed

and that I have to reorganize it into

src/foo/foo.py
src/foo/__init__.py
tests/test_foo.py
py.typed

?

mighty wigeon
umbral portal
#

leg

tiny hamlet
# wooden ibex <@!488766611134742528> Docker it?

I did not think of that. However, my use case involves the actual development environment rather than external testing environments. Most of the tools deal with the state or use build tools of the machine. In other words that would be like using 'git' via a dockered container.

Docker would work for platform agnostic cases, but not for those that are cross platform in the sense that they have to adapt to the platform they run on. For example docker would work in parsing some json, but invoking a compilation using proprietory sdks would be a bit of a hurdle to configure - if it works at all. Also invoking GUI programs would also have a steep configuration curve.

Some of the tools are ones I'd rather keep private to our team. This would require setting up a private repo for docker. I guess that's doable, but I need to validate if docker works in enough cases.

tiny hamlet
tiny hamlet
# viral sky im having trouble getting mypy to recognize the type hints in a package when it'...

Probably not the answer you're looking for, but I've found it easier to comply to that directory structure when possible. There's so many corner cases that I can't be bothered.

In addition I use poetry. With that I can get the structure out of the box with poetry new <project name> and refer locally from one project to another using the pyproject.toml file as other_project= {path = '../other_project'}

#

At least with that you could validate if the typing comes theough / works the way you intended, when they're setup into that dir structure

obtuse saddle
#

What's the state of WSL now? I prefer having Windows for a home system, but I'm likely to work with Unix-specific packages in the future.
Right now I'm dual booting, but having two systems is annoying, so maybe it's possible to switch to one system.
Is that setup viable and problem-free?

  1. Dev and work environment is inside WSL, including python interpreter and package manager (anaconda)
  2. I can access source code and data files from windows (for example, I may want to attach a file to the e-mail from Windows or save downloaded file directly into data folder
  3. Pycharm installation is inside windows, but works with package manager inside WSL
viral sky
#

which is really annoying

tiny hamlet
# obtuse saddle What's the state of WSL now? I prefer having Windows for a home system, but I'm ...
  1. works as long as you do the dev work only inside the wsl and don't require any GUIs

  2. might work until windows locks some file. Not a blocker but annoying.

  3. probably will result in pain. wsl and windows environments are in that sense separate, that for example python has to be installed to wsl and win separately.

Also one of the caveats of wsl is that file permission handling from within wsl leaves a lot to hope for. Win has additional perms settings that you can't - or at least couldn't a while back - configure reliably from the linux side.

So far my only positive experiences with running linux and windows in tandem are running linux in a virtualbox vm. File sharing can still result in file locksby windows, but yeah - that's what windows does

obtuse saddle
#

Thanks! Soooo.... Dualboot it is

#

I wanted to use Pycharm on the windows side, because, as you said, GUIs don't really work with WSL and I'm not leet enough to code in vim.

tiny hamlet
#

Linux works pretty nicely inside a virtualbox. It feels icky, I know, but you have access to typical dev workflows. If you're doing some specifc work that won't fit the vm flow, then sure - it's out of the question.

#

And I've used pycharm etc inside the vm - all the graphical stuff. Usually I opt for xubuntu because I think xfce is lighter than whatever comes with default ubuntu.

tiny hamlet
#

There is a x11 port for windows. I used that to bridge the gap between wsl and windows. The startup of programs is painfully slow and there is quite some configuration to be done to make it work.

#

It still doesn't provide wsl to pycharm for what I know, and would probably take you into a deep rabbit hole to make it work, if it's possible

obtuse saddle
#

Well, deep rabbit holes is precisely what i want to avoid :)
I'm learning to use python to interface with various specific data processing programs, which are mostly supposed to run on linux servers, and even if they have GUI, they often have CLI interface. While I don't have much experience, everything looks like it will run on VM without major problems.

#

However, I'm more used to GUIs for writing scripts, debugging, resolving merge conflicts, ect.

#

Luckily, i didn't have issues with Linux Mint on the desktop aside from various annoyances stemming from incompatible file systems for my windows and linux install.

#

Googled a bit, and apparently GUI on WSL is in the works (WSLG), but zero idea how good would it be and when it would be released

dark folio
#

hey

#

i have a problem with pip

#

is this the right channel?

warm pollen
#

Sure, what’s up @dark folio ?

dark folio
#

im trying to package a kivy app with buildozer but i get WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

tiny hamlet
#

coincidenttaly bumped on something about certain kivy versions not working with certain python versions. Sometimes python versions have changed breaking stuff as they've moved packages to different places. I don't think that's the case, but maybe check that just in case too

heavy knot
#

👋 Hey there! If anyone would be willing to help me with PyCharm in #help-apple, it would be greatly appreciated.

sly sleet
#

@obtuse saddle vscode has a extension that lets you run the gui on the windows side and connect it to a server in wsl; does pycharm have anything similar?

dark folio
#

oh i fixed it

#

buildozer android clean

#

thanks

tiny hamlet
#

well wasn't that a necessary unrolling.. /s

clever wyvern
#

Anyone know where I might find an expert on snekbox? I have an issue... Seems like if I send the server two requests at approximately the same time one or both gets an out-of-memory error (return code 137).

heavy knot
#

I'm trying install Python on VS Code but i meet this error "CommandNotFoundException"

muted notch
#

@heavy knot what command are you running in terminal?

heavy knot
#

@muted notch pip install -U pylint --user

muted notch
#

@heavy knot try just a normal pip install pylint

heavy knot
#

@muted notch Fatal error in launcher: Unable to create process using

muted notch
heavy knot
#

That's not working 😕 @muted notch

sly sleet
#

i have a bunch of submodules in a directory

#

how do i convert them to normal directories

#

where they each have their own history

#

a la git clone

#

and i cant delete them because some of them have untracked changes

muted notch
#

@heavy knot I'd try re-installing your python from the site and seeing if it works

heavy knot
#

@muted notch Not working

muted notch
#

@heavy knot does this work? python -m pip install --upgrade pip

heavy knot
#

Not working, i try re-install VS Code and Python

muted notch
#

@heavy knot if you type python does that work? are you able to get into python?

heavy knot
#

Yep, python works fine @muted notch

#

I think the problem is caused by VS Code

heavy knot
#

I solved problem

#

Just Restart the PC

#

LOL

muted notch
heavy knot
#

🤣

little cedar
#

https://github.com/dephraiim/termd

A small project I made to render Markdown files in the terminal. You can read any .md file and also it supports md files hosted online.

shadow crow
#

Hi. You can share your Python content in off-topic channels, in #python-discussion or in an appropriate topical channel, but we don't allow advertising of projects not directly related to Python.

tawdry needle
#

https://pypi.org/project/towncrier just found out about this tool. seems very useful, but quite different from the usual NEWS.txt type of workflow. does anyone have any first-hand experiences with it that they can share?

smoky compass
#

I am looking to use Sphinx autodoc to generate some human readable docs from my docstrings. I'm confused as to what I need to put in my index.rst to get it to just document everything it can automatically

#

I found a medium article but it seems to be implying I need to add a directive for every module. That seems excessive?

dusty maple
#

@smoky compass You can write the autodoc directives manually but you can also run sphinx-apidoc on your package and it should generate the appropriate directives for you. Depending on how you want to format your docs you might want to edit some things.

smoky compass
#

Yup, thanks I just discovered that. Right now this is my first play with Sphinx and I’m just trying to generate simplistic docs for every class/function

#

I’m not thrilled by the theme, it’s OK, but it doesn’t seem to put any space between definitions, which when the docstring is one simple line makes it a little “wall of text”

#

Any recommendations for good info on getting the most out of it much appreciated

dusty maple
#

I personally use the theme that ReadTheDocs uses (sphinx_rtd_theme); provides just enough spacing for each section/subsection w/o fiddling with the vanilla styling

smoky compass
#

Interesting. I might give that a go. I’m not a huge fan of blue though (although it is my companies colour so 🤷‍♂️ )

#

I need to work out how to include non-auto generated files to the docs too. Like I want the top level to have overviews of the project, some detailed help on common tasks etc, then a link to the apidoc part somewhere

spiral cypress
#

I need help installing and using a sound tracker called ODAS.

I just need someone to thought check me on what I am doing wrong....

I have it installed, but I cant figure out where to put the client/server IPs in the config.

compact python
#

How do I add a custom library to IronPython in visual studio

heavy knot
#

New Anchor Podcast Episode. Python Basics: IDEs and Text Editors | Episode 7. Let me know what you think. https://anchor.fm/thirdeyecyborg/episodes/Python-Basics-IDEs-and-Text-Editors--Episode-7-eniusv

Python Basics: IDEs and Text Editors | Episode 7 by Third Eye Cyborg Podcast

I will be talking about the core foundations of Python segmented throughout different episodes of this Podcast. In this episode I will be going over the best IDEs and Text Editors in Python. I also plan to go into other programming languages and software development technologies in future episodes.
Check out my website here, I have a newsletter ...

soft axle
#

I have this issue with PyCharm where it thinks everything I import is invalid, does anyone know how to fix this? Thanks in advance!

#

(Code runs fine)

ionic condor
#

Where can I learn to turn a python file into an exe?

tranquil creek
#

google for pyinstaller @ionic condor

heavy knot
velvet granite
#

Hello

viscid lagoon
ionic condor
viscid lagoon
#

Will use again Jupyter Notebook in my Python codes. What should I use? Anaconda, browser (conda), or Google Colabs

#

I will use Jupyter mainly for my ML learning. What are you using?

gray whale
#

This is a more deployment oriented question, please bear with me. I am using a FLASK API + Next JS fronted. The application is very backend heavy.
Operations : An excel file with 100k records is matched with another one with 100k records using an algorithm.
Worst case - 10 users simultaneously send a request to the server to perform this operation. What kind of EC2 instance should I get?

warm pollen
#

Hey @analog cobalt, we don't allow advertising here

analog cobalt
#

Sorry

warm pollen
#

:+1:

knotty flame
#

@warm pollen

warm pollen
#

Hmm

#

Have you already done any git operation with this project?

knotty flame
#

nope its a new project that i created

#

im going to try using / while creating a new file as someone suggested in general

warm pollen
#

Ahh, so there's a little bit more work to do here

#

I'm not experienced enough with the git plug-in to help though, I'm afraid

knotty flame
#

its fine i used / after typing in my folder name and it worked. thanks a lot for your help though :D

muted notch
#

can I get a some help on handling a failure using retry in this Step Functions section?
https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html

What i'm trying to understand is how this snippet works:

            "ErrorEquals": ["States.TaskFailed"],```

If I have a Lambda that returns a Exception message from a API call, how can I have that bubble up to step functions to handle the retry scenario? I _don't_ want to retry for all errors in the Lambda, only a specific Exception message that occurs
smoky compass
#

Does anyone here use GitLab CI/CD? I am trying to understand, if it is possible, how to deploy our python package onto our server using it. Basically the "deployment" just involves installing the package into a venv on a Linux VM at a specific path. If anyone has any experience/thoughts please ping me

final sky
#

Why is PyCharm autocompletion broken when I use Conda?

atomic granite
#

Does the pause button in VSC actually work for any of you guys?

leaden turtle
#

hi guys got any tool can help to auto buy the things ??

#

like in lazada , amazon

#

kindly like can help to buy in the limited time

heavy knot
#

@leaden turtle This channel is for discussing development tools and so on. Besides, pretty sure amazon doesn't allow for automation. We won't be helping you with it.

leaden turtle
#

ok

civic grove
#

is there a pep8 but for git?

heavy knot
#

I would like to get .exe file based on mine .py file. how to do that using pyinstaller

wooden ibex
#

Melio, not really

#

Each group does git differently

honest glade
#

I have a bit of a Frenkenstein data preprocessing script, one part is written in pandas, another bit in pyspark. Now, when feeding it a large source file my laptop clearly shows its limits (hangs at [Stage 0:> (0 + 0) / 1] indefinitely). What would be my best shot at running this on aws?

Is EMR my only option here?

analog kettle
#

I'm thoroughly confused. Why would PyCharm tell me that the files are being uploaded when they very clearly are not?

#

The only explanation I can think of is that the server I'm trying to upload is swallowing them without doing anything.

soft axle
#

I'm also having trouble with PyCharm, it's not recognising my modules correctly and it's so annoying

#

It works fine with the default interpreter, just not in the venv

analog kettle
#

@soft axle where does it say your venv is?

#

also, why are your imports in a try block?

#

Do File > Settings > Project: [project_name] > Python Interpreter

#

if you don't see discord in the list of packages, there's your problem.

#

(Ping to reply or I won't see it)

soft axle
analog kettle
#

Because it might lead to confusing behavior later if you get a ModuleNotFoundError that isn't solved by the way that you handle it.

soft axle
analog kettle
#

@soft axle I wouldn't recommend that either. Python was going to give you an error message that tells you you didn't have it installed without any added work on your part.

#

(And exit the program, for that matter)

#

Also, since this swallows the ModuleNotFoundError that you would have gotten, you don't get to know which module wasn't installed

#

whereas the actual error would have told you

#

I guess what you could do is

#
except ModuleNotFoundError as e:
    raise ModuleNotFoundError('Look at the requirements.txt file') from e
#

that way they get both error messages. But looking at the requirements file if you're missing something should go without saying lemon_long

soft axle
#

Unfortunately, PyCharm is still screaming about invalid imports, which are definitely valid...

analog kettle
#

I wouldn't bother with those two comments--the general Python style is that stdlib imports are grouped first.

Here's what I'd do: delete your virtual environment and start over.

#

I end up doing it a lot because I hate figuring out where I messed up with environment stuff.

soft axle
analog kettle
#

if you don't pick a new interpreter, PyCharm will just say "fuck, where'd the interpreter go?" when you try to run something.

#

I'm mad at pycharm right now so that's why I'm using bad words ducky_devil

soft axle
#

Yep, it's now asking me to select an existing one or make a new one.

#

Is it a good idea to make a new virtual interpreter for each project, or can that quickly get very cluttered?

#

@analog kettle

analog kettle
#

@soft axle I have a separate one for each project

#

you can tell pycharm that certain environments are for specific projects only and then it won't even list them in other projects

soft axle
#

Also, I assume that the option I want is "Virtualenv Environment"?

analog kettle
#

yeah, don't check "make available to all projects"

soft axle
#

Ok, thanks! Sorry for all the questions, I'm still quite new to Pycharm :P

analog kettle
soft axle
#

@analog kettle Unfortunately, the re-install of the interpreter didn't help. It gave me the popup asking me to "install dependencies" which it correctly itentified as discord.py, munch, python-dotenv then gave me confirmation that it successfully installed, but it still lints them wrong

analog kettle
#

@soft axle I'm about to have a meeting with my advisor but hopefully someone else will come along. This is the right channel, and you can also use the dynamic help system (see #❓|how-to-get-help)

soft axle
#

Ah, no problem. Thanks for all your help!

wet sparrow
#

Hey this might sound weird but is there anyway i can put variables in server.properties (its a minecraft file that has a lot of false true or (name) I am trying to make a gui of it using pysimplegui but can't find a way to create the variables.

viral basin
#

Idk if this belongs here bnut how woulod i set a np array with no deffiended shape

thick veldt
#

seems as if dbus isn't working in the docker container, but I'm not sure why I haven't seen any solutions online

gritty shoal
#

perhaps the container can't see the host socket

thick veldt
#

I'm not sure why it even would need to, especially since I don't need to communicate back with the main host

#

Maybe chrome needs it for some reason

#

but it seems to work fine with the error running

opaque kettle
#

I've come across a weird bug and I'm like 90% sure it's just vsc (it's not happening anywhere else, I'm downloading another editor to confirm this), but my indents keep deleting themselves

minor galleon
#

hello

cloud elbow
#

for example I'm working on a new feature (alternate universe)

as I'm working on, I went back on master and fixed something.

then I'm back to my feature branch. how do I also apply that fix in master branch to my current feature branch

tawny temple
#

Git merge master

cloud elbow
#

ok, but will my feature changes be kept?

shadow drum
#

heyo guys, i'm using Visual Studio Code, I have Discord library installed, python 3.8 installed and i have an error using "import" but the import is working : / Can VSC have a false error ?

#

Here is the error and the context :

#

I have the error ``Unable to import functions'`. The file where the error is contains :

from functions import create_character

I have a tree looking like the screen below. I'm using a function in character_function.py, file in the folder functions.
I have py from .character_function import create_character

tawny temple
shadow drum
#

please grumpchib

chrome quest
#

hi, does anyone know how i can disable the current line number highlighting in VSCode? 114 would be white as well instead of orange

#

this is version 1.52, i looked for it but can't find anything related to disabling highlighting of line number specifically

dusty maple
#

@shadow drum That sounds more like a project structuring project more than a VSCode problem now that I see it

shadow drum
#

idk the import is working well

dusty maple
#

On runtime?

shadow drum
#

like, i can use the function but vsc tell me i can't

#

yes

#

so

#

can i send my code ?

#
import json
import os

import discord
from discord.ext import commands
from functions import create_character


class CogCHARACTER(commands.Cog):
    def __init__(self, bot):
        self.bot = bot
    

    
    @commands.command()
    async def character(self, ctx, arg=None):
        with open('pvp_character\\character.json', 'r') as file:
            data = json.load(file)
        print("Debug 1")
        if arg is None:
            print("debug2")
            if str(ctx.message.author.id) in data:
                reset_message = await ctx.send("You already have a character, do you want to reset it ?")
                await reset_message.add_reaction("✅")
                await reset_message.add_reaction("❌")
                
                def checkreaction(reaction, user):
                    return user == ctx.message.author and reset_message.id == reaction.message.id and (str(reaction.emoji) == "✅" or str(reaction.emoji) == "❌")
                try:
                    reaction, user = await self.bot.wait_for("reaction_add", timeout = 30, check = checkreaction)
                    if reaction.emoji == "✅":
                        await create_character(self, ctx)
                    else:
                        await ctx.send("You cancelled")
                        await ctx.message.delete()
                        await reset_message.delete()
#

when i check the checkmark emoji it's running the function

#

and it's working very well

dusty maple
#

This goes a bit out of scope for this channel already, I suggest taking a help channel or going to #discord-bots

shadow drum
#

i thought it was my text editor

#

isn't it ?

dusty maple
#

It is VSC, although what your code does wouldn't really be related to the current problem at hand

shadow drum
#

well i'll use a help channel

#

this one

chrome quest
mild lance
#

If I have a git remote like this:

main -> dev
|
\/
main 

How should I get the changes from main to dev. Would I just git rebase main dev?

warm pollen
#

git merge main with dev checked out

mild lance
#

thanks, that's what i ended up going for

errant cipher
#

what should i use

#

i use repl atm

#

but i want an app that specificely uses python

#

not sure which onbe

#

would heklp if someone replied

rich nymph
#

@errant cipher There are quite a few on our tools page, its just personal prefrence really

#

!tools

rancid schoonerBOT
#
Tools

The Tools page on our website contains a couple of the most popular tools for programming in Python.

rich nymph
#

I personally use Visual Studio Code

errant cipher
rich nymph
#

happy to help

sage forge
#

anyone know how I can make my git repo smaller?

#

I am storing a large csv but everytime I make a small change to the csv file the get rep size doubles

wooden ibex
#

Don’t use git for large file storage

#

It was designed for smaller code text files

#

There is git lfs but hosting for it is expensive

thin warren
#

Hey guys. I have data from solar installations which are stored on an FTP server. Data are sent every day at 3 a.m (csv files). I then have to analyze the data to see if the solar power plants are working properly. What kind of tools should I use to monitor the data (visualize, alerts and emails) ? Can I do it with only Grafana ?

heavy knot
#

is it possible to remove these warnings from the variables in 'Pylance'?

#

everything works fine, but the 'Pylance' says that the variables have not been defined.

opaque kettle
#

you can bring the mode down from strict or disable it in settings

opaque kettle
#

then just define the types

smoky compass
#

Does anyone here use Celery and periodic tasks? If so do you have a good/accepted method for registering new tasks with the beat_schedule which doesn't involve using Django?

graceful patio
#

so if my build process doesn't use docker, but builds a docker image at the end, I don't need to do this?

proper lion
#

Not sure if this is the right place to ask... trying to get some OpenStreetMaps modules for a project, pip install OSMPythonTools fails with ERROR: Could not build wheels for ujson which use PEP517 and cannot be installed directly. Novice here but I do know that wheels are needed to compile on different OS/cpu architecture/etc and tried pip install ujson --no-use-pep517, ujson==1.35, --no-binary... no dice. Anyone know my alternatives? How can I get a module when pip doesn't have the right wheels?

muted cobalt
#

Considering dropping docker as our code works perfect on all machines tested, except when ran as a docker container.
https://stackoverflow.com/questions/65299676/async-python-error-while-running-api-in-docker-asyncpg-exceptions-base-interfac

Mention me or reply on the thread
Any help would be appreciated

tiny hamlet
#

Anyone else having issues with pip? xmlrpc.client.Fault: <Fault -32500: 'RuntimeError: This API has been temporarily disabled due to unmanageable load and will be deprecated in the near future. Please use the Simple or JSON API instead.'>

neon merlin
#

Any idea on how to configure Atom to use Python 3 instead of python 2?

heavy knot
#

no

#

sorry

spark falcon
#

hello, so i encountered this issue where when i called a file outside of the folder, that called file throws import error (the error file is importing another file), but when i instead, just run the error file and not from the file outside of the folder, the import error disappears
here's my folder structure for brief

(file)main.py
(folder)app--
            |--(file)app.py
            |--(file)views.py
            |--(file)__init__.py

so app.py import views.py and perform some tasks, when i call app.py, everything works fine, but when i call app.py from main.py, it throws an import error at the place where app.py imports views.py

sage forge
#

anyone know how I can delete a gitlab repo history? The large files is taking up all my storage

arctic flicker
#

hi.
how can change the path on VSCode? so I can import from a different folder

#

can't seem to find this on google...

#

I was able to do it with "sys.path.append()". but it causes VSCode to not recognize the module.

arctic flicker
#

how can it be that this is such a rare use case. does nobody ever import from a parent folder?

heavy knot
#

I am following along in the Django for Professionals book and I am stuck at the first chapter where you create a django project and app

#

using pipenv and then Dockerizing it

#

when running docker build . i get the following error

#

=> ERROR [4/5] RUN pip install pipenv && pipenv install --system

#

I ignored that, made a docker-compose.yml file

#

and ran docker-compose build

#

and got this error

#
ERROR: Service 'web' failed to build : The command '/bin/sh -c pip install pipenv && pipenv install --system' returned a non-zero code: 2```
#

This is my Dockerfile:

#
FROM python:3.8

ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

WORKDIR /code

COPY Pipfile Pipfile.lock /code/
RUN pip install pipenv && pipenv install --system

COPY . /code/```
#

This is my docker-compose.yml file:

#
version: '3.8'

services:
  web:
    build: .
    command: python /code/manage.py runserver 0.0.0.0:8000
    volumes:
    - .:/code
    ports:
    - 8000:8000```
sage forge
#

hard to tell with that error message. try running the docker image with -it and running the command within the image

#

or include the results of the docker build command when i tried to run the line RUN pip install pipenv && pipenv install --system

heavy knot
#

🤨 😕

#

how

sage forge
#

when you did docker-compose up build it output data right?

#

what does the logs say

#

returned a non-zero code: 2 is not enough information to even guess what the problem is

heavy knot
#

its over 2000 chars so that's why i didn't include it

sage forge
#

usally only the ending part matters

#

it should said "error: " somewhere right before it failed

heavy knot
sage forge
#

weird. it looks like pip failed to install pipenv

#

well you can go inside the image and try running the command yourself

#

do docker images to get a list of the images you have

#

the failed images should be <none> with the latest timestamp

#

get the hash of that image. then run docker run -it --rm <hash> /bin/bash

#

that command will let you essentially exec into the image and then you can run pip install pipenv

#

my only guess is that you lost internet connection when you tried to build the container

heavy knot
#

oh

#

it says pipenv is already installed

#

It gave me a warning about my pip version

#

so i upgraded it

#

how do i get out of this line root@59c4cf95575e:/code#

sage forge
#

exit

#

the warning isn't the issue

heavy knot
#

uhh

#

it suddenly worked

sage forge
#

yea. i think your internet failed you the first build

heavy knot
#

I'm so confused

#

oh

sage forge
#

socket.timeout: The read operation timed out

#

so it tried to download pipenv when you first built it. but it timeout while downloading

heavy knot
#

I see

#

Duuude Thx so much!!

sage forge
#

np man. now you know some simple commands to debug docker build errors

heavy knot
#

Hello,

I want to check if my application imports particular library.
For example: i want to detect if my code contains this import statement import my_library .

how can i check that? is there any option in flake8 ?

opaque kettle
#

iirc flake8 doesn't do anything close to that, but usually module checking is done with a mix of try/catching a ImportError as well as checking if the .__version__ is the version you need for your code

lavish beacon
eager loom
#

are noob question allowed here?

tawny temple
#

Yes, of course.

eager loom
#

i need to create a command line tool for a simple todo list.
i don't know where to start?

tawny temple
heavy knot
#
django.db.utils.OperationalError: could not translate host name "db" to address: Name or service not known```
#

That is the error I get when running docker-compose exec web python manage.py migrate

#

my docker-compose.yml contains:```docker
version: '3.8'

services:
web:
build: .
command: python /code/manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- 8000:8000
depends_on:
- db
db:
image: postgres:11

#

This Is what I put for DATABASE in settings.py:```python
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': 'postgres',
'HOST': 'db',
'PORT': 5432
}
}

#

I have tried running docker-compose up -d --build and then docker-compose exec web python manage.py migrate

#

But that doesn't work.

olive warren
#

Is there a way to install ffmpeg with pip? It would be cool to automatically have always the right version, whether on windows or linux.

night quest
wise scarab
#

unzip Pysbs-2020.2.2-py2.py3-none-win_amd64.whl -d
'unzip' is not recognized as an internal or external command,
operable program or batch file.
What kinds of install zip on python 3.9?

tawny temple
#

ffmpeg-python is just a wrapper around FFmpeg. It expects you to already have the FFmpeg binaries installed locally by some other means.

knotty kettle
#

anyone have experience packaging (freezing) pypy apps? need a solution other than docker

knotty kettle
night quest
#

There is something like py2app but I never used it before

knotty kettle