#tools-and-devops

1 messages · Page 33 of 1

grizzled trail
#

Oh i'm on windows, but yeah thank you so much!

severe thistle
#

Just started using PyCharm. Stupid question: What does it mean when it says it's "Updating skeletons"? Never really used an IDE before.

granite monolith
#

updating skeletons

restive wasp
#

Is pycharm's debugger supposed to be slow?

granite monolith
#

... no?

#

@severe thistle is it a bg task?

#

is it consuming too many resources?

restive wasp
#

Did you mean to ping me or was that for him?

#

What's incredibly slow is this serialization thing

#

It's iterating through encoders and stuff.

severe thistle
#

@granite monolith Not really, just curious as to what that is.

#

(Data Scientist, just dipping my toes into some more traditional SWE duties)

noble dove
#

how do I zip it?

#

just @ at me if you can help, thanks

true scroll
#

Hey guys I have a question about Spyder: I have been using spyder for data analysis/plotting and VSCode for other stuff (mostly games/bigger projects). For visual studio I can wrap lines by using ALT+Z. How can I have the same feature in spyder?

stoic quest
#

how do you remove the lines suhc as like this in sublime text

floral hound
#

Hey guys, trying to determine a good keyboard for coding

#

I'm thinking a worked one with a track of so I don't need to move my hand to a mouse

#

Any recommendations?

sinful zinc
#

@stoic quest I can't find how to disable them, but they're called "indent guides" if you want to search through settings (i don't have sublime installed)

stoic quest
#

yeah appareciate @sinful zinc

#

thanks

#

got it already

lime sable
#

is temux a good way to run python on android? or is just a last resort thing

bronze surge
lime sable
#

i was thinking as a developer side of things, using vi or nano to edit some scrapy spiders while i'm on the bus to school for example

#

well, there is a port of clang so that is a good thing

river night
#

if I have a folder structure like:

|- Butterfly
    |- __pycache__
        |- __init__.cpython-37.pyc
    |- __init__.py
|- main_butterfly.py
|- .gitignore

etc., what's the correct gitignore pattern to ignore the pycache folder and all pyc files inside?

#

I tried Butterfly/__pycache__/, but it didn't work

lost rock
#

I would have guessed just __pycache__/ should work ... but yours too 🤔

river night
#

^ git status

#

still the same 😦

#

or is it because it's already committed before?

lost rock
#

wait, doesn't "modified" mean these files have been tracked before?

#

yeah, that is a mess then

river night
#

oops I may have done that accidentally

#

darn let me untrack them

#

my bad

lost rock
#

did you commit these files before?

river night
#

probably accidentally when I added Butterfly folder and committed it

lost rock
river night
#

yup works now, thanks @lost rock

#

yup got it 😃

lost rock
#

👍 cool

heavy knot
#

how do i use pypy on pycharm?

heavy knot
#

😭

vapid hearth
#

Anyone have an issue when hitting the rerun button in the console on pycharm? It just gets stuck as a background task and does nothing for me.

slender ibex
#

Whats a good cheap reliable laptop to write python programs?

lucid swift
#

Have you guys ever had a problem where VSCode won't step into module code even though PYTHONPATH is set to the correct path to make those modules discoverable?

#

i.e. If I have some code like:

from my_module import MyModuleFunc
y = 5
x = MyModuleFunc(y)
print(x)

I can't step into the MyModuleFunc when it is in an external module.

hollow burrow
#

i have a question

delicate gorge
#

!t ask

rancid schoonerBOT
#
ask

Asking good questions will yield a much higher chance of a quick response:

• Don't ask to ask your question, just go ahead and tell us your problem.
• Try to solve the problem on your own first, we're not going to write code for you.
• Show us the code you've tried and any errors or unexpected results it's giving
• Keep your patience while we're helping you.

You can find a much more detailed explanation on our website.

vagrant horizon
#

How do I use mypy with flake8?

cosmic dune
#

I would advise just running them independently of each other

heavy knot
#

I made a rather odd decision today

#

I decided

#

im going to learn tkinter in 2 days

#

help

#

can someone give me some resources to get up to speed with tkinter as quickly as possible?

lost rock
#

same situation

#

it sucks

heavy knot
#

any help though? what did you do when you had that situation?

#

like I need to learn tkinter in 2 days

#

because of a school assingment thats you know only 40% of my final

#

any resources that are brief and to the point would be helpful

lost rock
#

if I had one

#

there are lots of resources, but most seem outdated or are either more like full api references or just tiny incomplete tutorials with barely any value

heavy knot
#

yikes

#

im stressed AF

shy yarrow
#

didnt know whether to put this here or security but... anyone know if macbookpros are decent for security in terms of working in the field (context: 3rd year info security student, i code too, it would be the 2015 pro 15" most likely)

lofty remnant
random breach
#

tf?

#

pycharm suggested i install this and then immediately afterwards that happens

#

oh and now it's popping up again

gilded bramble
#

Hey is anyone using Pythonista on iPad?

wicked crystal
#

Hi, does anybody use VS Code and know how to make flake8 lint "on change"/"on type" instead of "on save"?

eternal flicker
#

currently that isn't implemented yet, the closest workaround would be to lintOnSave then turn on auto save + configure auto save delay

wicked crystal
#

What about the new python language server?

#

I think it should support lint on change, but I have no idea, if it's possible to configure it with flake8

eternal flicker
#

if you add the setting python.jediEnabled: false you should be able to use the new language server that has live linting, but not with specific linter like flake8 or pylint

#

at least to my knowledge

wicked crystal
#

Do you know, if there's any issue I could follow concerning this feature?

#

Cause all I found are closed I think

#

Or about the new language server, which doesn't support flake8

eternal flicker
barren iron
#

I got flake8 to work on the new server

eternal flicker
#

please share

barren iron
#

You see... it just worked

#

I changed that one option... and everything worked like normal

#

python.jediEnabled: false

#

I did as you suggested for the auto linting, lint on save and autosave on change

wicked crystal
#

...

#

That's what I don't want

#

I don't want it to autosave

barren iron
#

Why is that a bad thing?

wicked crystal
#

I don't want files to save while I'm writing code, in some random place, I want to save the file when I need it saved.

#

PyCharm, atom, sublime have this, but VS Code doesn't

barren iron
#

I can confirm

#
"python.jediEnabled": false,
"python.linting.flake8Enabled": true,
#

Both of those options make flake8 work for me

wicked crystal
#

Without autosave on change?

barren iron
#

No

#

The auto saving doesn't work

#

in some random place

#

You choose where they save

#

?

wicked crystal
#

What?

I want flake8 to show me errors while I'm writing code and I don't want that code to be autosaved and I don't want to have to save the code for it to get linted.

#

So basically I want changes in "buffer" to be linted

barren iron
#

I don't understand the issue with it... you could always make your own script to do it

wicked crystal
#

How would script fix this? I want flake linter to lint my current state of file, that is not saved. This works fine with other popular editors which I pointed above and it's nothing special, it's just the fact that vscode doesn't have it for some reason.

barren iron
#

I imaging its not really needed

#

Not sure though

#

From github it doesn't seem like the community wants it very much

south skiff
#

so i installed anaconda on my system

#

and i just don't understand it lol

#

cuz like

#

my pip uses python 3.5 and anaconda is python 3.7.1

#

oof

languid helm
#

anaconda doesn't use pip iirc

#

o nvm, it can, but the primary solution is to use conda

median perch
cold gate
#

It's not working because scipy depends on mkl version >= 2019.1, but mkl is also given as a dependency at version 2019.0 (which is incompatible with the version scripy depends on)

#

So, you may want to think if you can use mkl version 2019.1 instead of 2019.0

#

As I don't know anything about your project or environment, I can't really help you with that

lucid fable
#

in VS code i used to type import os and then os. would cause all attributes of os to pop up

#

now that's not working anymore

#

any ideas?

#

not just os btw

#

importing any module

eternal flicker
#

did you change any settings?

lucid fable
#

not that i know of

#

i was writing python on the plane

#

and it worked

#

now im on wifi and its not

eternal flicker
#

Have you tried restarting vscode? Is this a consistent issue?

lucid fable
#

yeah

#
    "team.showWelcomeMessage": false,
    "window.zoomLevel": 0,
    "csharp.format.enable": false,
    "editor.fontSize": 18,
    "keyboard.touchbar.enabled": false,
    "editor.codeLens": true,
    "csharpfixformat.style.spaces.beforeParenthesis": false,
    "workbench.startupEditor": "newUntitledFile",
    "csharpfixformat.style.braces.onSameLine": false,
    "files.exclude": {
        "__pycache__/": true,
        ".idea": true,
        ".next": true,
        "*.o": true,
        "*.pyc": true,
        "*/bin/": true,
        "*/obj/": true,
        "lib": true,
        "node_modules": true
    },
    "gitlens.advanced.messages": {
        "suppressShowKeyBindingsNotice": true
    },
    "gitlens.defaultDateStyle": "absolute",
    "workbench.statusBar.feedback.visible": false,
    "csharpfixformat.sort.usings.splitGroups": false,
    "csharpfixformat.style.braces.allowInlines": true,
    "workbench.activityBar.visible": true,
    "python.pythonPath": "/Users/carlos/anaconda/bin/python",
    "editor.formatOnSave": true,
    "csharpfixformat.sort.usings.order": "",
    "python.jediEnabled": false,
    "python.linting.pylintEnabled": true,
    "clang-format.fallbackStyle": "none",
    "editor.suggestSelection": "first",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue"
}
#

here's me settings.json

eternal flicker
#

hm, what do the last two settings do?

lucid fable
#

so i just set the jediEnabled to true

#

and it fixed

#

but

eternal flicker
#

Python Language Server is when jediEnabled is false

#

if you’re using Jedi, shouldn’t be an issue

lucid fable
#

im confused

#

i never changed my settings

eternal flicker
#

hmm

lucid fable
eternal flicker
#

does it not look right?

lucid fable
#

but every time i open vs code with python i get that warning

#

whereas before it just worked

eternal flicker
#

do you have workspace settings overriding your user settings that’s messing with jediEnabled?

lucid fable
#

maybe

#

fixed it

#

there was like a new extension that got added

#

and they conflicted

#

^ it was this

#

idk wtf this is

#

but i didnt install it

eternal flicker
#

looks like the Microsoft Python Language Server extension, if you used jediEnabled false and it prompted you to install it

heavy knot
#

is it possible to map an if/else statement with one line after a map?

#

it's kinda glitched

#

nnoremap <silent> <F5> <esc>:if g:asyncrun_status == 'running'<BAR>AsyncStop<BAR>echo "Script killed!"<BAR>else<BAR>AsyncRun python %<BAR>endif<CR>
---
inoremap <silent> <F5> <esc>:if g:asyncrun_status == 'running'<BAR>AsyncStop<BAR>echo "Script killed!"<BAR>else<BAR>AsyncRun python %<BAR>endif<CR>```
wicked crystal
#

Hi guys, I thought that since this is python discord, there's a chance someone is interested in linting on change feature in VS Code and if you are, you can help by upvoting this issue. If you don't want to, just don't do anything, I just wanted this issue to get additional attention, thanks :)
https://github.com/Microsoft/vscode-python/issues/408

#

Also if anybody from mods has issues with this, please just remove my message, I just thought that someone might want to help

delicate gorge
#

Are people allowed to simply PR features in even if there is no official Plan to do that?

wicked crystal
#

Are you talking specifically about the repo above or just generally?

#

Anyway, it's usually pointed out in Contributing Guidelines for the repo

odd lion
#

there's something confusing me

#

so with github, you make feature branches to develop features, but when someone merges there's into the master, and then you wanna merge yours, what do you do

violet belfry
#

?

mint briar
#

Well, their changes will be in master now so you can just git pull origin master --rebase

river night
#

for vs code, is there a way to pull up the docstring popup when the cursor is within the function itself, for e.g. pd.read_csv("file.csv", |) where | is the cursor position?

#

there is Ctrl+K Ctrl+I for pulling up the docstring if the cursor is on the read_csv text, but not while my cursor is inside the function call itself

forest flume
#

Hi, could you please tell me where I can find the settings in PyCharm to underline a python file in red in the project tab when there is an error in that file ? (tag me in your answer)
Currently, statements with errors are underlined in red in the editor but the file itself is not underlined in the project view.

tawny temple
#

Is that even a feature in PyCharm in the first place? I can't recall ever seeing that

hardy cedar
#

it's an inspection thing I think

tawny temple
#

Don't know why I felt it wasn't in PyCharm

#

I know it's in other IDEs like Visual Studio

hardy cedar
#

I have no idea how to enable/disable it though

#

Maybe it's something that came with material theme

tawny temple
#

How can I fix issues with colour on Cmder/ConEmu? I've followed the docs to enable true colour but it just isn't working

low chasm
#

Is there no dracula theme for Material UI in PyCharm? I use it in IntelliJ

celest violet
#

What does the debugger in vscode/pycharm do?

hoary sail
celest violet
#

Thank you

cloud jungle
#

What python 3 IDE should i get

surreal yoke
#

You could start out by PyCharm

flint crane
#

So ugh

#

travis, github and digital ocean not necessarily digital ocean but any random server travis doesn't support out of the box

#

I want to somehow create a droplet on digital ocean, connect to it

#

and run my script which is in after_success: in .travis.yml

#

There is apparently an example here but I can't seem to figure out how do they connect without putting the ssh public key to new droplet

#

or do they? if so, how?

#

probably api lets you add an ssh key :3

#

lemme see

iron basalt
#

How do you guys use VSCode workspaces? I can't seem to be able to figure out the ideal workflow they're supposed to support. What I normally do is have a single root folder for all projects, which contains directories for each distinct project. Each of those directories then generally has its own git repository. I prefer to have the ability to have multiple projects open inside the same editor window, and I don't generally use different editor settings for projects, so what I've done is set up a single workspace at the root directory. This works fine, but I think VSCode wants to assume that each workspace has its own git folder, and its git integration gets confused by the fact that there are multiple repositories inside the same workspace. Have I messed up somewhere, or is this correct?

#

Oo I think it just found the other repositories as well, so disregard

#

Regardless I'd be happy to hear how people use the workspace system, and whether using a single workspace for all my projects with multiple entirely distinct repos is an anti-pattern

violet belfry
#

Seems like an antipattern to me, the root directory isn't a workspace, your individual projects are

iron basalt
#

I would agree, but I don't think VSCode has the ability to have multiple workspaces open inside the same window and navigate through them using the usual explorer

#

So if I want to have multiple projects inside the same window, they need to be in the same workspace, if I understand this correctly

violet belfry
#

Yes

#

Are you working on something where you need to have multiple workspaces open at the same time?

iron basalt
#

I prefer to have the ability to have tabs from various projects open at the same time, within one window

prisma nexus
#

I'm doing a project in pycharm using a virtual environment, but I had to reinstall python because there was an issue with sqlite3, is there a quick way to reinitialize the virtual environment rather than creating a new project and copying my files over?

flint crane
#

file

#

settings

#

project

#

interpreter

random breach
#

i chose this 'run file in console' option once and now i cant run the file normally any more

#

any time i try it runs it in the console again, then display a REPL prompt

#

anyone had this problem before?

hearty monolith
#

hey mates, someone fit with git? Need to store a SOCKS5 proxy in my config, but everything I tried so far didn't do the trick.
Essentially git config --global http.proxy socks5://myProxy:1080 didn't do it, same with socks as protocol. Using git for windows
Still ending up with this:

$ git clone git@my-gitlab.de:username/testprojekt.git
Cloning into 'testprojekt'...
ssh: connect to host my-gitlab port 22: Connection timed out
fatal: Could not read from remote repository.
#

I can verify that the proxy is correct, since I have the exact same proxy configured in putty, and the connection works from there

heavy knot
#

@hearty monolith what if you try to clone with https instead of ssh?

hearty monolith
#

it works with HTTPS, already tried that. But I have some 5GB repos and the payload is too huge to use HTTPS.

#

I could adjust my config to allow that, but I'd rather make use of keys and SSH

#
$ ssh -T git@myGitlab.de

already times out

heavy knot
#

The .ssh folder is under %userprofile% with windows

#

Maybe this helps?

hearty monolith
#

i'll give it a shot. Thanks, @heavy knot . This is driving me nuts. Big downside if you are working in a big(ger) company

heavy knot
#

No problem! I don’t have experience with proxying ssh on windows but I can try it layer on when I’m at my workplace

hearty monolith
#

same here lol... forced to use windows :0

heavy knot
#

The only reason I use windows is for games 😅

hearty monolith
#

@heavy knot i might be onto something with the hint you gave me

heavy knot
#

@hearty monolith Okay! Do keep me updated since I’m interested in what may have fixed it

hearty monolith
#

not fixed yet, but I assume I added a HTTP proxy and using an SSH connection, so it doesn't work for obvious reasons

#

I know I usually can store an SSH-proxy in .ssh/config but not sure if windows mounts that automatically

#

since it works in putty, I might be able to change from openSSH to putty - have to give it a shot

heavy knot
#

Well .ssh should work on windows since git for windows store its ssh connection within that folder

hearty monolith
#

no config though. It might be done with simply adding the file

heavy knot
#

As far as I know that should work 😁

hearty monolith
#

Just digged around deeper, can't find any setup for storing an "ssh-proxy" if that even is a thing.

#

weird

heavy knot
#

What happens if you create the config file with the data from that article?

#

Maybe this provides to be useful

true scroll
#

Hi! Anyone here using vscode and the jupyter notebook support from the python extension ?

#

I have an issue related to my current working directory

#

I am running this code:

#%% #this is for allow run cell from jupyter notebook

import os
print("Hello World!")
print(os.getcwd())
#

And if use the debugger (F5) the console output is:

(base) theis@theis:~/code/N_path_intership/PlottingCode$ cd /home/theis/code/N_path_intership/PlottingCode/python ; env PYTHONIOENCODING=UTF-8 PYTHONUNBUFFERED=1 /home/theis/anaconda3/bin/python /home/theis/.vscode/extensions/ms-python.python-2019.4.11881/pythonFiles/ptvsd_launcher.py --default --client --host localhost --port 34295 /home/theis/code/N_path_intership/PlottingCode/python/t7est7.py 
conda activate base
Hello World!
/home/theis/code/N_path_intership/PlottingCode/python
#

While if I run the cell this happens:

Hello World!
/home/theis/code/N_path_intership/PlottingCode
#

I am completely lost about how to fix it

twilit patrol
#

@true scroll can you put "%%debug" at the start of your cell and try like that?

true scroll
sinful cypress
#

hey guys

#

how do i save a.py file as a PDF?

#

i need to turn in a Python file for a school assignment as a PDF

#

and as stupid as it sounds, it's required

eternal flicker
#

you should be able to just convert it to a pdf, no? It’s essentially a text file

languid helm
#

You can usually select pdf when trying to print something.

#

If there is no direct way to do it in the software

vernal patio
#

@sinful cypress try loading the file into libreoffice WRITE and then export it as a PDF.

stiff maple
#

Hi I trying to generate documentation with Sphinx, but I am getting the following error for all of my python packages when running make html
WARNING: autodoc: failed to import module 'codename.api' from module 'com'; the following exception was raised:
No module named 'com'
I read many solutions, primarily the most common suggestion I found was to add to Sys path in config.py but I am still getting the warning and as a result nothing is getting documented when its generated.
I was wondering if anybody had any suggestions.

#

My directory structure is as follows

#
ProjectFolder
+    com
+    +    _init_.py
+    +    codename(redacted)
+    +    +    _init_.py
+    +    +    Bot.py
+    +    +    api
+    +    +    +    _init_.py
+    +    +    +    apiParser.py
+    +    +    +    jsonTools.py
+    +    +    cogs
+    +    +    +    _init_.py
+    +    +    +    apiCog.py
+    +    +    discord
+    +    +    +    _init_.py
+    +    +    +    discordTools.py    
+    +    +    json
+    +    +    +    _init_.py
+    +    +    +    jsonDataTools.py
stiff maple
#

I got it. I'm an idiot and apparently put the main package as the sys path instead of the root. Setting it as the root fixed it.

rugged hare
#

@stiff maple do you really have files named _init_.py? They should be __init__.py

stiff maple
#

I typed that all manually, it was whatever PyCharm generated.

rugged hare
#

ok

stiff maple
#

I mistyped the name of those files.

tight root
#

Hey. Any VSCode guru around here?

#

Was watching the last Corey Schafer video about VSCode to check for new tips to use it

#

and found out my Intellisense is basically not working

#

Well not for every modules.. The first example he gives on Intellisense is with the requests module, and on my computer it doesn't suggest any method when I type r = requests.

dense pawn
#

Did you install the Python extension for VSC?

tight root
#

Yep

#

btw requests is not on the list when I start to type import r

dense pawn
#

Ah, is your python environment discovered correctly or did you set it right manually?

#

Should show up on the status bar in the lower left

tight root
#

facepalm

dense pawn
#

Like, if your requests package is installed in a virtualenv or something, and VSC isn't showing the venv'd python as the current... it won't know it's there 😄

tight root
#

I did also pip install requests to check if I had it..

#

I tried to clean up all my env, even deleting a previous /anaconda/ thing

#

closed VS, did pip install requests again and it actually installed it

#

now it's working..

#

Btw... what the hell happened here?

#

I did even upgrade pip like 10mn ago. Now it says it's not upgraded anymore

dense pawn
#

Well, I see you're on Mac, and I see /usr/local/bin, which is usually from homebrew

#

Homebrew's pip for python 3 is called pip3, so if you pip install it will use python 2, which from your env list is /usr/bin, which is the stock system python

#

You're probably going to want to brew install python@2 if you need to use pip and python 2 that's more up to date...

#

Also using an environment manager is highly recommended. I would suggest pipenv, which is incredibly useful and a lot less painful than most

tight root
#

Wow... lot of information

#

I remember using brew once or twice, probably that case

#

But I always used pip for everything.. Inside regular terminal and inside VSCode terminal

dense pawn
#

Sure, but which pip you're using and where it's putting stuff can change.

tight root
#

What is the point of using an environment manager? I used to have anaconda for simple installation, but it messed everything up so I uninstalled it (and probably installed python3 using brew lol)

dense pawn
#

Well, there's probably two main reasons

#

One is isolation, the other is bundling.

#

To give an example with pipenv, it uses a file describing the packages you want in the environment, called Pipfile, and with only pipenv installed, you can do something like pipenv install, and it will create the isolated environment and install the packages into it

#

Then you can do simple stuff like pipenv shell to get a shell in the env, or pipenv run blah to run blah in the env directly.

#

Plus update all the bundled packages with a single command, etc.

#

VSCode understands environments like that too, and usually automatically picks them if they exist

#

That means from a dev perspective, you could git clone a repo, open it up in VSCode, pipenv install, and the python tooling in VSCode will recognize it all and have access to the packages present in it

#

Without ever installing those packages on your global python installation

#

(hence the isolation part)

tight root
#

So it's kinda of bad practice to install every packages (even used once) in the same (basic) env ?

dense pawn
#

Eh, depends. If it's just some local dev on a laptop and you're not planning to change much over time, or have a need to build things that can deploy to remote servers in large stacks and can benefit from isolating them from each other... nah

#

It's not so much that not using environments and isolating packages from each other is bad practice, moreso just that there are potential benefits to it. Same rationale as using containers, in a sense. Isolating pieces from each other and bundling them into a group can provide certain benefits

#

One of the most obvious benefits of the bundling approach is that you can specify what packages/versions your code A) needs and B) has been tested with.

#

There's many ways to specify that, but using an environment will help ensure that your code doesn't run against some other version of a package that's already on the system.

#

A container image has the same sort of goal in mind. "This has all been tested together". As versions change over time, sometimes the same code doesn't work right anymore. It's a common class of bug that's easy to avoid by 'pinning' versions

#

Blah blah, those aren't generally "just writing some code on my laptop" concerns, but it's not hard to setup isolated envs anyway as a good practice ;P

tight root
#

Hmm ty for all those informations.

dense pawn
#

lol sure

tight root
#

To be honest, I'm still the guy "wring code on my laptop" but always trying to improve

dense pawn
#

To be clear, wasn't intending to cast aspersions on that! I have the most fun that way

#

I've just also spent a decade or two writing code that money changes hands over, so more considerations should be taken ;P

tight root
#

For sure! Thanks for the time spent explaining me that.

#

Any good video explaining how envs work on Mac?

#

(idk why but now that I discovered Corey Schaffer, I feel that I have to learn everything new by watching videos)

#

(and of course.. trying myself)

dense pawn
tight root
#

ty!

stiff maple
#

So I am trying to add a description to a method in Sphinx and the doc string does not show up even though if I put the same doc string in another method it shows up. Parameters do not show up in the docs when its generated either the only thing that shows up is "discord.ext.commands.core.Command object" in place of where the parameters would be. Any ideas?

#

It should show addfolder(self,ctx, aname, foldername, channelid, inverted)

#

instead it shows addfolder = <discord.ext.commands.core.Command object>

covert plume
#

df.tail() does not seem to show in jupyter unless I print it explicitly. Is this normal behavior? It was giving me nice output but now it is only text based

covert plume
#

How do I use a custom class in a new cell in jupyter? I doesn't seem to recognize it?

#

nvm

ashen breach
#

Can FFMPEG do MP3 Tagging (album, artist, album cover, etc.)?

tawny temple
#

yes

#

It's called "metadata" by their docs

gloomy saddle
#

anyone know git push syntax to automatically push local branch to origin, with tracking, with same name?

#

oh is it HEAD

#

git push -u origin HEAD ?

tawny temple
#

Yeah that should be it

#

a branch just points to a commit, same as head

random breach
#

is there a standalone exe tool that can create an empty venv of a given python version?

#

something that could work regardless of whether the user had python installed on their system or not

balmy cargo
#

so not an empty venv exactly, but a self-contained python executable as well so they could run your app without installing python? that would be pyinstaller. you can run that on your whole project when its ready to distribute

barren iron
#

You might be able to find pyenv with a .exe installer

deep estuary
#

pyenv is bash

#

if you want to use pyenv use WSL

balmy cargo
#

now that i re-read, it does seem like they are asking more for something for dev than distribution. whoops

random breach
#

basically something that does what python -m venv [directory] does but as a standalone exe that doesn't need python installed on the system

#

so youd do something like make_venv -3.7-64 [directory] and bam, it'll make a fresh venv based on the latest version of 3.7 x64 in that directory

tawny temple
#

Not that I know of but doesn't seem too hard to write yourself

random breach
#

ive been trying. running into a bootstrapping problem.

tawny temple
#

You basically just need to fetch python, there are portable distributions provided for major versions iirc

random breach
#

the only portable python install ive found is WinPython and the releases for that are spotty

tawny temple
#

they have releases in zip files don't they?

random breach
#

the python installer cant do multiple installs of the same version

#

the zip files are bare and dont even have the venv module

#

theyre intended for embedding python into other applications

tawny temple
#

Maybe use something like miniconda for managing multiple versions?

random breach
#

ill take a look at that. but ideally i'd like to not have to install anything else

#

just one exe that'll download all the required stuff and make the venv

tawny temple
#

idk if it's portable

random breach
#

i wish this was built into the official installers

#

at the very least a 'portable install' option

tawny temple
#

I wonder if you'd even have to run the installer for the clients or if you can run it once, take the output files, and package them in your script/program

random breach
#

one thing i've considered is using py -[version] -m venv path then packing the result of that for distribution

#

but ideally i'd like to all happen on the end user's side

tawny temple
#

I believe venv's still rely on a global python version

#

I've tried using a venv made for a version of python I dont have and it broke

random breach
#

do they??? ah shit

tawny temple
#

Don't know specifics but that is my experience

#

try it out for yourself, not hard to test

random breach
#

wonder if it's just an environment variable config issue

#

maybe I need to set PYTHONPATH first

heavy knot
#

What IDEs do you guys use

manic minnow
#

vscode

tawny temple
#

VSCode technically isn't an IDE

manic minnow
#

yeah but i doubt thats what hes asking

tawny temple
#

Realistically, what IDEs are out there for Python anyway? PyCharm, VS, and Spyder are all I can think of

mint briar
#

yeah

plush tree
pallid wing
#

Thanks

dire quartz
#

@pliant panther There are tools similar to CMake for Python as well. I'm not necessarily the best person to ask about this, but maybe https://github.com/pypa/pipenv could fit your needs.

pliant panther
#

Gotcha, I'll check it out!

dire quartz
#

I'm also not sure if this is necessarily the best solution to the problem, but it seems like you can install packages from the local filesystem with pip: https://stackoverflow.com/questions/15031694/installing-python-packages-from-local-file-system-folder-to-virtualenv-with-pip

pliant panther
#

Hrm, yeah. I'm just not sure when/where to make that decision. I can see workflows where I'll want trunk, or a branch, or a local dev copy, and I'm not sure where or how the developer makes that decision

dire quartz
#

I mean, if you can pip install from the local filesystem, you could check out the version you want, build the local package then pip install it into the dependee.

#

For testing purposes.

pliant panther
#

True, good point

random breach
#

anyone used any python memory usage profiling tools they'd recommend?

tawny temple
#

Aren't they all kinda underwhelming? I remember looking into it once and it turns out profiling memory is kinda tricky in Python IIRC

random breach
#

anything would be better than what im relying on atm

#

which is basically looking at task manager 😛

copper compass
#

@heavy knot

heavy knot
#

hi

copper compass
#

This is the correct channel for git/editor discussion

#

:P

heavy knot
#

got it! Why can't I use IDLE btw?

copper compass
#

It's just bad

heavy knot
#

I like it because I don't have to configure anything

copper compass
#

It breaks weirdly, it is missing essential features, it's confusing

#

How much of a beginner are you?

heavy knot
#

CS minor, took about a 1 year break from coding

copper compass
#

You'd probably be OK with an IDE then?

heavy knot
#

Yeah I've used Atom and Sublime at the request of my friends but I always found myself going back to IDLE lol

copper compass
#

Ah, no, those are also editors

#

:P

#

What kind of machine are you running?

heavy knot
#

Previous model of the Macbook Air bootcamped to Windows

copper compass
#

Alright

#

well if you're secure in how well it performs, you should grab a copy of PyCharm Community

heavy knot
#

Would this solve the git issue?

copper compass
#

This is the first consideration - getting you a decent editor

#

you said you don't want to have to set up a bunch of plugins, and PyCharm is a mostly all-inclusive IDE

#

it's what I use myself, although I use the pro version

heavy knot
#

Okay I'll grab that after class, thank you

copper compass
#

Also it does have git integration if that's your thing

#

the second thing to think about is your project layout

#

are you using a virtualenv?

heavy knot
#

nope

#

oh wait

#

does bootcamp count

gloomy saddle
#

no

heavy knot
#

I would assume not because I believe my system runs one or the other

#

yeah okay

gloomy saddle
#

you're tlaking about macos bootcamp?

heavy knot
#

yes

gloomy saddle
#

yeah completely different thing lol

copper compass
#

OK, so what's in your project folder?

#

also, hi Ivo o/

heavy knot
#

just my .py and a few txt files need to run the test suite on

gloomy saddle
#

hyullo

copper compass
#

right okay

#

are they big text files?

heavy knot
#

negligibly small

copper compass
#

so you don't have any big files, and you don't have lots of files

#

what git command did you run?

heavy knot
#

git init worked fine then

git add .

ran me up to 131F

gloomy saddle
#

fahrenheit?

heavy knot
#

yes

gloomy saddle
#

oh 55 c

heavy knot
#

20 degrees over my comfort level

gloomy saddle
#

that's not terrible

heavy knot
#

That's like gaming comp temp, no?

gloomy saddle
#

completely fine in terms of cpu

#

cpu's doin' real work at 80c

copper compass
#

nah, gaming comp is like 80c

heavy knot
#

Well that's good, I do try to keep it as low as possible though

copper compass
#

yeah

#

well it must be adding files

#

What if you do git status?

gloomy saddle
#

you did these git commands inside an isolated project folder, right?

copper compass
#

Oh, good thinking

heavy knot
#

define isolated

#

also i'll do status now

#

should I do status from within the project folder?

copper compass
#

When you open the command prompt, you are doing cd path/to/my/project first, right?

heavy knot
#

ofc

#

says ofc
burns cpu with gitbash
lol @ me

gloomy saddle
#

its a folder with just a couple' files in it, nothin' else

heavy knot
#

correct

copper compass
#

try git status from wherever you ran the add from

heavy knot
#

holy shit

gloomy saddle
#

post a screenshot of ur console maybe

heavy knot
#

when I did status, the display looks like it's trying to do my entire tree

copper compass
#

yeah, so you're in the wrong place

heavy knot
#

but I did cd first

gloomy saddle
#

cna you show screenshot?

heavy knot
#

yes, one minute

gloomy saddle
#

is this like... windows subsystem for linux

heavy knot
#

I have no idea

#

lmao

gloomy saddle
#

you have $ as your prompt, but on a Windows file system

heavy knot
#

only in git bash

#

my cmd is normal

gloomy saddle
#

type pwd

copper compass
#

You're in the wrong folder

heavy knot
#

also I'm worried gitbash did permanent changes to my drive

gloomy saddle
#

what it give you

copper compass
#

this is your home folder

heavy knot
#

/c/users/[me]

gloomy saddle
#

so you never cded then

heavy knot
#

i did!

gloomy saddle
#

presses X to doubt

heavy knot
#

reeeee

gloomy saddle
#

should just be able to delete the .git folder there

heavy knot
#

do basically my entire drive got gitted?

copper compass
#

it will have changed the line endings of a ton of files

#

there's no undoing that

heavy knot
#

😦

gloomy saddle
#

depending on the option you chose when installing?

copper compass
#

Nah, there were messages about it

heavy knot
#

can the line endings break anything

copper compass
#

yes

#

You'll just have to wait and see

gloomy saddle
#

ohlol

#

windows prefers CRLF

heavy knot
#

i see what I did

#

i DID cd

#

I did NOT notice that it didn't like the path I gave it

gloomy saddle
#

i think it displays the path you're currently on above the $ ?

heavy knot
#

idek I'm more concerned about my os right now

#

did it change all that stuff too?

copper compass
#

It changed things under your home directory

heavy knot
#

so is that just my own personal files?

copper compass
#

No, there are hidden folders there with application and system data

#

It's just all specific to your user account

heavy knot
#

maybe I'll just copy paste my code into google drive

gloomy saddle
#

this is a surprisingly nice detailed explanation about git's LF/CRLF settings and shenanigans

#

might even be something you could do to set it to want CRLF and then add everything again...

heavy knot
#

thanks guys

#

can I get an f to pay respect to my line endings?

gloomy saddle
#

lf

manic minnow
#

was scrolling up, did you git add your whole pc?

heavy knot
#

fuck yeah I did

gloomy saddle
#

basically

#

his home folder

manic minnow
#

do the line endings get changed on git add?

#

or only commit?

gloomy saddle
#

git add . on the C:\ drive would be pretty funny

heavy knot
#

would that fry the os

manic minnow
#

assuming everything there was crlf, you could probably use git to convert back lol

gloomy saddle
#

well to be fair you'd moreso run into a lot of permission errors probably

heavy knot
#

fire with fire, git with git

manic minnow
#

i think youre probably fine

#

it shouldnt touch binary files

#

i think it would only be a problem if there were somehow files that needed to be LF, which i kind of doubt

#

(if youre on win)

#

so im still curious

#

this would only convert if you had git manually setup to convert or if the repo was set to convert right?

heavy knot
#

I'm on win but it's bootcamped, is that okay?

gloomy saddle
#

well i looked at C:\Users\<me>\AppData\Local\Microsoft\Windows\Themes\Custom.theme and it was in CRLF

#

on my system

#

i would check and see on yours

heavy knot
#

just ran c cleaner, only caused 2 registry errors

gloomy saddle
#

@manic minnow files are normally in CRLF in windows and i would imagine git would've changed them to LF?

manic minnow
#

i dont know why they would be changed at all

#

unless you manually set it up to change

#

or are connected to a repo with that enabled

gloomy saddle
#

what does git config --global core.eol give you in console flopsy

heavy knot
#

It output the same line about "warning something something changed to LF something" 8x10^9 times

manic minnow
#

when?

#

on add? or commit?

heavy knot
#

add, never even made it to the commit

manic minnow
#

ok

#

i wonder if you do reset will it convert back?

heavy knot
#

i closed the terminal to kill the process back when it happened

manic minnow
#

well if you type git status

#

i assume it shows a ton of files?

#

do you have the original warning?

#

it might not actually have touched your files

heavy knot
#

I do not

#

maybe it was just outputting a warning

#

how can I make pylint globally ignore an error?

manic minnow
#

@heavy knot can you look at git status, find a file name, and check on disk if it has a new timestamp

heavy knot
#

also, I'm trying to do this again only the correct way, and when I do

git config --[mygithubname]

it says the key (which I'm guessing my e-mail) was not found

#

sure but I should prob finish this first

#

or can I run 2 of these?

#

Ik I can

#

but I feel like it would be a bad idea

gloomy saddle
heavy knot
#

Thanks Ivo, I'll try that after lunch

sinful zinc
#

hopefully the C drive is not a git repository

#

so it would immediately notice the lack of C:\.git

heavy knot
#

Commit seems to have worked, however the files do not appear on github

#

also the add I did before the commit worked

#

as well as the init

#

Did I somehow mess things up by making the repo private?

iron basalt
#

commit is local

#

if you want it to go to github youre looking for push

heavy knot
#

oh that explains it

iron basalt
#

if you have origin set and want to push to the master branch then you would do git push origin master

heavy knot
#

to establish the destination would that be

iron basalt
#

yee

heavy knot
#

So I set the destination as the direct link to the repo which I also now made public, but neither git push --all or git push origin master seems to work

#

It says:

#

either specify the url from the command line or set up a remote repo

#

and I thought I did both of those

iron basalt
#

did you name it origin though?

#

if you do git remote -v it will show you the remotes you have set

heavy knot
#

oh my, I thought origin was a keyword

iron basalt
#

origin is used by default when you clone afaik

#

so it remembers where the code came from

heavy knot
#

why didn't git commit --all work then?

iron basalt
#

commit is just local, it won't go to github

heavy knot
#

oh right my bad

#

Do you know what could be denying my rights to the push if I already made the repo public?

iron basalt
#

mm what does it say exactly?

#

public / private shouldn't make a difference if you own the repo

mint briar
#

do you have your git creds configured?

heavy knot
#

yes, I did both the global name and email

mint briar
#

you need to set up your ssh key with github to push with ssh

#

if you're cloning with git@github.com:name/repo, git uses SSH whereas if you're using https://github.com/name/repo, it just uses HTTPS

heavy knot
#

I'll do the latter, do you know how to delete the remote origin I set up before?

mint briar
#

git remote remove origin

heavy knot
#

"remove is not a git command"

mint briar
#

remote followed by remove

heavy knot
#

oh jeesh, I'm so sorry

#

ahh

mint briar
#

no prob

heavy knot
#

it worked! 😃

#

Thank you everyone

#

Now I'm going to write down the exact steps so I'll never forget

#

I'm surprised none of my CS classes ever taught us about github

#

It seems like everyone uses it

iron basalt
#

in my opinion if youre just starting its easier to initialise the repo on github and then clone it

#

because that will automatically set origin for you

#

and then you can just stage -> commit -> push

heavy knot
#

Hmmm. Which way is it typically done in industry? I'll just try to get used to whichever that is

iron basalt
#

in industry its probably more common to clone / pull from already existing repositories since you will rarely be starting new projects, but im not sure

#

for personal projects is a matter of preference

mint briar
#

yeah there isn't really a hard-and-fast rule for it

#

just depends on when you're making the github repo

#

If you've already got a project locally that you want to put on github, it's easier to make a github repo and add the remote to your local project

#

If you're making a new project, it's easier to just make the github repo and then clone it

heavy knot
#

Got it. Thanks again guys

dim igloo
#

Hi guys someone can help me with pycharm interperter?

#

I already tried adding the conda, or pipenv but say there are no executables.
I did a search and it really does not exist
I already tried to reinstall and it did not solve
I have projects in python that have to be done through pycharm and I can not because it does not find environments

dim igloo
#

Pls guys im crazy with that

iron basalt
#

Can you run your Python code outside of PyCharm?

#

The base interpreter should point to your installation of Python that you normally use, the env is then built off that

#

I don't really use PyCharm but I can try to help you if it's an urgency

#

If you can run your Python code in a terminal using something like python my_file.py then you can run where python (assuming windows) and it will show you where python is

#

You would then set that path as the base interpreter

dim igloo
#

Can you run your Python code outside of PyCharm

#

Yes i use more times JupyterNotebook

#

But only for study, now im trying to program with kivy and Tk and on jupyter its more hardest

#

where python i tried this one

#

But when i select the python.exe and the interpreter is choosen they dont execute the program

#

Or if i choose conda env they got some errors

#

@iron basalt Its hard for me fix the problem

iron basalt
#

What do you mean by they dont execute the program

dim igloo
#

for exemple, i give you a print, i have print("...") and the pycharm execute but dont give a output on console

iron basalt
#

Are you sure that you are running the correct file

#

These need to match to run that file

dim igloo
#

Its the correct file

#

main on right side is to choose the interperter

iron basalt
#

Right click the tab and click run

dim igloo
#

But i have some errors when i choose the env and interpreter

iron basalt
#

Oh ok

#

What are those errors then

dim igloo
#

When is conda, i havent the python.exe on the folder conda

#

And when is on the python, dont give errors but dont run ir nathing

#

Would it be too much work for you to connect to my pc with the teamviewer?

iron basalt
#

Have you tried right clicking the tab and clicking run as in the screenshot above

#

Sorry I cannot do that

dim igloo
#

It's complicated to explain mistakes I've never seen, and even youtube does not solve

iron basalt
#

I understand but have you tried clicking the tab and clicking run, as in the screenshot above

dim igloo
#

I go try for 300 time XD

iron basalt
#

I'm asking because it's fairly common in PyCharm that people run a different file that is set as the starting point of their project

dim igloo
#

I select the interpreter

#

@iron basalt Now appears that. So i go add the config ?

iron basalt
#

Please right click Aula_1.py (the tab) and click run, as shown in the screenshot above 👀

#

That should create the config automatically too

dim igloo
#

Guy you are my god xD

iron basalt
#

There we go

dim igloo
#

I was setting up by myself

iron basalt
#

Now you can see in the top right next to the run button, the config says Aula_1, that means every time you press the run button, it will run this file (even if you have a different file open)

#

If you decide you want to run a different file, you have to explicitly tell PyCharm to do that

dim igloo
#

The conda continues with errors, but at least now I can use the main python

#

I understood, I did not know it automatically generated this way, I thought it had to be me to set it up.

Thank you very much

iron basalt
#

Yeah no problem, it's definitely confusing

dim igloo
#

Now I will learn to try to work with the Tk library in one night ...

last quail
last quail
#

also sphinxcontrib.napoleon just won't work for me

last quail
#

re-did the sphinx quickstart and now it works flawlessly, weird ThinkRotate

heavy knot
#

Anyone know what would cause anaconda prompt to not recognize pip even though I have I installed and ran get-pip.py?

static cedar
#

Anaconda runs its own environment isolated from your normal python install. They also expect you to use conda instead of pip

heavy knot
#

how is "conda" not recognized in an anaconda prompt, what is this madness

#

also this looks exactly like a cmd except the title bar says anaconda prompt

#

I'll try reinstalling it I guess

static herald
#

Anyone knows why vscode doesn't use the python environment defined in settings.json?
It shows up in the select options but when i select it, nothing happens, it does not get selected 😮

gloomy saddle
#

@heavy knot sure you're not already in python shell?

#

also miniconda is great if you don't want to start out with all their default packages

heavy knot
#

I think it was actually cuz I didn't select the option to make conda the default python

#

I didn't know exactly what that would do

random breach
#

go home pycharm youre drunk

eternal flicker
#

could it be that you have to assign it to something before pycharm stops complaining?

random breach
eternal flicker
#

ok pycharm is drunk

random breach
#
(sound_device_test)  C:\Users\admin\Documents\Projects\sound_device_test\python-sounddevice>pipenv install git+https://github.com/0xf0f/python-sounddevice#egg=sounddevice
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its
own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Installing git+https://github.com/0xf0f/python-sounddevice#egg=sounddevice…
Warning: You installed a VCS dependency in non-editable mode. This will work fine, but sub-dependencies will not be resolved by $ pipenv lock.
  To enable this sub-dependency functionality, specify that this dependency is editable.
Collecting sounddevice from git+https://github.com/0xf0f/python-sounddevice#egg=sounddevice
  Cloning https://github.com/0xf0f/python-sounddevice to c:\users\admin\appdata\local\temp\pip-install-fyakoy7r\sounddevice

Error:  An error occurred while installing git+https://github.com/0xf0f/python-sounddevice#egg=sounddevice!
b'  Running command git clone -q https://github.com/0xf0f/python-sounddevice \'C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-fyakoy7r\\sounddevice\'\n  Running command git submodule update --init --recursive -q\n  error: Server does not allow request for unad
vertised object f684e3a8c96877a98e28b2089b3fbd7657312f3b\n  Fetched in submodule path \'_sounddevice_data/portaudio-binaries\', but it did not contain f684e3a8c96877a98e28b2089b3fbd7657312f3b. Direct fetching of that commit failed.\nERROR: Command "git submodule up
date --init --recursive -q" failed with error code 1 in C:\\Users\\admin\\AppData\\Local\\Temp\\pip-install-fyakoy7r\\sounddevice\n'
Installation Failed
#

how would i solve this? seems like it's not really liking the _sounddevice_data submodule

tawny temple
#

Based on that, I think it doesn't like that the submodule references that specific commit

#

This is really weird actually...

#

I don't see where that commit for the submodule is

#

If I click on it, it takes me to spatialaudio/portaudio-binaries and I see 0xf0f's commit at the top

#

but if I switch back to master, that commit is gone and there are also no other branches

#

And it's the original repo, not a fork or anything

#

Something fishy going on 😒

random breach
#

welp

#

i just went ahead and removed it 🙃

tawny temple
#

Removed what? The submodule?

random breach
#

yeah, just readded the files in its place

tawny temple
#

The fix would be to set the submodule to a proper commit

random breach
#

this is the first time ive ever come into contact with submodules 😅

#

also pycharm might have been the culprit, since that's what i used to commit

#

maybe it's time to learn how to use git properly...

tawny temple
#

The docs on submodules can be a bit overwhelming. Though IIRC it isn't much of a concern when you aren't modifying code in the submodule

#

But if you are, there are are different ways to deal with commits and pushing changes to remote etc

#

I forgot that stuff so when I revist old projects with submodules I just commit and push in a separate dedicated repo rather than in the submodule 😄

brittle isle
#

Do you guys know how to properly manage mapping in Celery, i.e. I have these tasks

from celery import task

@task
def foo():
    return [1, 2, 3]

@task
def bar(n):
    return n * 2

And I would like to define a workflow like that

from celery import group

(foo.s() | ???(bar.s())).delay().get()

Which would return [2, 4, 6]. I would like ??? to act as group (i.e. parallelizing tasks) but mapping an iterable instead of applying the same result to the same one. I could not manage to find a proper way to do that yet without having to deal with non-trivial subtasks management, any idea?

#

Or even better for y use, an equivalent of chord with the same idea of mapping an interable.

lyric tulip
#

Why does editing html in pycharm feel so clunky with reorganizing indent levels? Am I approaching this wrong or is it just a funky experience?

cunning yew
barren iron
#

Its asking what you want to make the ".csv file open

#

Its a excel table... right?

#

@cunning yew

cunning yew
#

I think so, I'm learning csv reading and writing from a yt video

#

its like an excel table

barren iron
#

Ok, you can just cancel that screen

cunning yew
#

ok so i selected text and it suggested me to install this plugin

#

oh

barren iron
#

Aceppt that

#

Install the extension

#

that will be useful

cunning yew
#

thats it?

#

god i didn't learn anything yesterday thinking i cant use csv on pycharm

#

🤦 thanks

barren iron
#
Pipfile.lock (8a3288) out of date, updating to (ca72e7)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Locking Failed!
Traceback (most recent call last):
  File "c:/users/mcarthur/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 3, in <module>
    import json
ModuleNotFoundError: No module named 'json'
File "c:/users/mcarthur/appdata/local/programs/python/python37/lib/site-packages/pipenv/resolver.py", line 3, in <module>
    import json
ModuleNotFoundError: No module named 'json'
#

Anyone ever seen this error before?

#

Pipenv python 7.3.1 in windows 10

#

I've tried reinstalling and upgrading both pipenv and python.

cold gate
#

I can't say that I have. Weird.

#

Uhm, you probably have no issues importing it yourself?

#

Did something happen to the venv itself?

#

Can you import it with the python binary of the venv, I mean

barren iron
#

Ill try all of that... for windows usually re installing python fixes these issues

#

I will let you know how it goes

#

@cold gate Can you import it with the python binary of the venv, I mean what do you mean?

#

I've never used venv, what am I trying to prove?

cold gate
#

You're working with a pipenv venv, right? If that specific virtual env is broken (i.e., json doesn't work with that binary of Python), then it may be that pipenv in general fails, although I'm sure if pipenv will even use the virtual environment interpreter to lock.

barren iron
#

I'm trying pipenv --rm

#

Ohhhh yes that was it

cold gate
#

Yeah, that will probably work. Deleting and recreating the virtual environment should work

barren iron
#

I had a old python 3.6 venv

#

But damn, that's a interesting way to display it isnt it?

#

xD

cold gate
#

It's cryptic, yeah

barren iron
#

Anyways thanks for the help once again

barren iron
#

Can anyone with pipenv get this to install properly?

#

It just breaks for me

random breach
#

what error are you getting

#

oh thats what the second link is nvm

#

yep i got that same error

#

last updates were 4 years ago so thats probably why

barren iron
#

gr8

vivid cargo
#

lol

molten smelt
#

A while ago vs code updated and now it prompts me for a certain type of execution whenever I run it with f5

#

would there be a way for it to set a default so that when I'm working on a project I don't have to manually select the debug configuration every time i run it?

lost rock
#

execution by sword?

#

nvm

molten smelt
#

#

tawny temple
#

It means that, in between when you last pulled and right now, someone else has pushed their own changes

#

You need to integrate their changes into your local clone of the repository before you can push your own changes.

heavy knot
#

But it's a private repository

iron basalt
#

maybe you made some manual changes like editing the readme directly on github?

tawny temple
#

Or you are on a different computer that has an outdated version of the repo

heavy knot
#

There isn't a readme and I only have used github on my laptop however I did delete an input file on the github end, would that do it?

tawny temple
#

Yes, it would

heavy knot
#

Noted, no more "git add ." So what now? Delete the repo and make a new one?

tawny temple
#

That's far too drastic.

#

Try pulling

heavy knot
#

Won't that overwrite on my local end?

tawny temple
#

It doesn't overwrite, it will ask you to merge

#

It tries to automatically resolve any conflicting changes

#

If it can't, then it will ask you to manually fix conflicts

heavy knot
#

Do I trust it to "automatically" fix things though

tawny temple
#

Yes

#

I've never had it go wrong

#

Well, not entirely true

#

Like it could still make for invalid code

#

but it wouldn't overwrite any changes

heavy knot
#

Thank you

covert plume
#

Is this a good place to ask GIT questions?

#

I have a Pelican static website that I would like to push to GitHub pages. But the way it is set up is a little strange. I have my configuration files (Makefile, pelican.conf, etc.) stored in one remote github repo, and the actually blog files (HTML/CSS, etc) get pushed to the github pages repo.

#

Locally, I have a single repo, and I am not sure how to push some files to my config repo, and my HTML files to my pages repo.

#

I keep getting the following error whenever I try to push

$ git push src master
To github.com:Timothy-Pulliam/linuxandchill-src.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to 'git@github.com:Timothy-Pulliam/linuxandchill-src.git'
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

#

I was in a detached head state

steel dune
#

@covert plume I assume that you commited localy to your master branch, and that the origin/master branch has evolved since you diverted from it.
solution:  
first give another named branch to you work
$ git checkout -b yourfeature
then replace your local master where it should point (the last origin/master branch your were sync to
$ git branch -f master origin/master

#

sync up your master
$ git checkout master
$ git pull

covert plume
#

@steel dune, I figured it out. I was in a detached head state, because apparantly that's how git submodules work.

#

I'm not using submodules anymore

#

at least not for what I'm trying to do

steel dune
#

ho good then !

covert plume
#

Thanks though

steel dune
#

no problem ! 😃

heavy knot
#

hello guys
i have some problem with compiling file
i can access some index through another py file, but when i compile the main.py file
and when i try to access the index again, it says no such file :

#

any suggestions?

faint tundra
#

hi guys

#

i am thinking of editor to use

#

emacs or vim or visual studio?

tawny temple
#

Try them all out and see what you like

barren iron
#

Visual studio or visual studio code?

tawny temple
#

Or look up some videos of them in action

barren iron
#

I'd say if you are considering Emacs and vim, use one of them

#

But honestly vscode is my favourite of the 3 - nice and graphical, but also fast on reasonable hardware

faint tundra
#

i heard vscode is good and vim is good

#

but i am using emacs right now.

#

only downside is that it takes 10 hours to configure before you can actually do work.

barren iron
#

Well vim is similar

#

Vscode has a UI for extensions, it's nicer to use.

#

But you can't config it the same

faint tundra
#

true.

#

but it also depends on your intended use i guess.

barren iron
#

I mean sublime text is a thing

#

It's the middle ground

#

In fact, that would probs be what I recommend you

#

Or neovim.

faint tundra
#

does it support more than text editing.

barren iron
#

You can install some terminals into it

#

Like, as seperate tabs

#

I got that working

#

It also has a nice open source package manager

faint tundra
#

ok. thanks dude.

#

never knew neovim existed

#

i will try them out later.

dusky blaze
#

Here's a bit of a weird question

#

What do you all think about Convention vs Simplicity. ie When choosing a tool, framework, module, etc etc. Using what is standard and widely adopted, versus using something that may be simpler and 'easier' for your task at hand

#

I think some people are too quick to stack on tools that make it simpler for them in the short term,

#

Then a new person on the team or their replacement inherits a stack with 100 different tools,

#

But if they stick to more conventional things it reduces tribal knowledge and onboarding costs

plush tree
#

If adding a tool is more complex than implementing it yourself, you probably don't need that tool.

cunning pendant
#

Hey! How do I install ipython module on debian? I installed it by using pip, but when I try to run my code I get an error saying that the module does not exist.

eternal flicker
#

what tool are you using to code?

prisma nexus
#

did you use pip3? it sounds like you might have installed it for python2 but not python3 and then tried to run your python3 code

#

@cunning pendant

cunning pendant
#

Oh, thee pip i different for python 2 and 3? I did not realize that.

#

Semms I only had pip for python 2 installed. Is it safe to remove that and only keep the python3-pip package?

eternal flicker
#

I recommend not touching any Python installations installed by the OS, it's used for OS tasks and removing them might break stuff

cunning pendant
#

I don't rhink pip is installed by default, so I can't imagine what would break?

languid helm
#

pip installed by default on newer python versions

pearl eagle
#

pythonX -m pip ...

#

that works too

#

X - target version

prisma nexus
#

also pip2 and pip3 cohabitate just fine on my system (ubuntu and mint)

cold gate
#

@languid helm There may be distro-shipped Python installations that come without pip

cunning pendant
#

I'll just leave it be for now. Can't use that much space on the machine.

prisma nexus
#

you may be able to do the pyhton3 -m pip <package>

fading glen
#

@velvet ivy what do you mean? Can you post a full error?

#

Context
what does it mean when pycharm gives me main error, (PLEASE PING AFTER THE RESPONS)

velvet ivy
#

Oooh

#

Ok gimme a sec

bright jolt
#

Hello, I hope this is the right room for a question about GIT. So, I'm extremely new to it and I'm currently working on some jupyter notebooks during my free time at work. Now, they're part of a repository and I can see from the GIT website that they're actually updated so it looks like I committed correctly or whatever's the correct terminology

#

Now, if I open the same repository from my home pc I cannot see the updates

#

What I did was cd until I got to the correct folder (since I already had it here) and git bash actually shows (master) next to it so I suppose it's correct

#

git status returns that my branch is up to date even if it isn't

#

Am I missing something here?

tawny temple
#

Run got fetch first

bright jolt
#

Okay, I just did a git pull and now it's fine

tawny temple
#

Or that

bright jolt
#

I still don't understand why git status didn't say that there were differences between the local files and the ones on git

tawny temple
#

That's what fetch is for

bright jolt
#

I'm quite sure this is just me not understanding git at all

tawny temple
#

It fetches changes from the remote repository (ie from githubj

#

It doesn't apply the changes, but just updates the "cache" so to say

bright jolt
#

Ok, I think I get it

#

Still, then what is git status for?

#

For some reason I thought it would actually check local rep against git rep

tawny temple
#

Well it does, but it uses the local cache of the github repository

#

Rather than connecting online to github

#

That's why keeping the cache up to date with git fetch is needed

bright jolt
#

Ah, fair enough

#

So git fetch needs to be followed by something else I suppose?

#

Since it only updates the cache?

tawny temple
#

You can run git fetch then git status right after

#

But when you do pulls, git will automatically runs fetch beforehand. So if all you want to do is pull, fetch isn't needed

#

But if you want to check the status before pulling, then it is

bright jolt
#

Okay, cool

#

Thanks a lot for taking time out to explain that, I appreciate it

tawny temple
#

You're welcome

dusky blaze
#

Hey all

#

Is anyone here using docker for dev environments? In particular the new remote extensions for VSC

#

I'm running into a lot of time wasted on edge cases developing on Windows for Linux systems so I thought it would be a good idea to move everything to a docker container

cold gate
#

I don't use VSC, so I can't comment on the new extension, but we do use docker for our projects here at PyDis

forest bay
#

I wouldn't recommend Docker as a dev environment

#

a lightweight headless VM would be a better option

#

Docker is designed for single isolated processes, often long-lived

#

You'll be constantly fighting the filesystem and network isolation for every tool you use

tawny temple
#

Maybe look at Vagrant?

#

I don't know much about it myself I admit

barren iron
#

What about using docker-compose volumes?

My Docker Images deal with all the pipenv-side of things, While my docker-compose scripts ensure the database and code are running and mounted.

sand pivot
#

GitHub question:
I pushed my local changed to a branch called WIP

#

I then created a new branch on GH called develop

#

I want to open a PR from WIP (which has my recent commit) to develop (which is empty) but when I try to open a PR I see

#
develop and WIP are identical.```
#

Any idea what I'm doing wrong?

tawny temple
#

How did you manage to create an empty branch?

#

Did you use -orphan?

sand pivot
#

No

#

Just made one in the GH web gui

#

In the branch search I just typed in "develop" which didn't exist and it offered to create one

tawny temple
#

Is it actually empty?

#

Or is it even with master?

sand pivot
#

It appears to be empty as there isn't any file in it

tawny temple
#

Does it have any commits?

sand pivot
#

But maybe I'm missing something

#

Develop doesnt

#

Neither does master

#

WIP does

tawny temple
#

Ah that's probably why

#

It was empty

sand pivot
#

So commit to develop?

tawny temple
#

You're sure you selected it so that it goes from WIP to develop?

sand pivot
#

Yeah the WIP is to the right of develop

#

Develop <-- WIP

tawny temple
#

Mind linking your repository?

sand pivot
#

I can't :/ it's got some private code

#

I wish I could

#

I understand it would help

tawny temple
#

I am out of ideas then

#

But do you need it to be PR in the first place?

sand pivot
#

Np thank you

tawny temple
#

Why can't you just merge directly into develop

sand pivot
#

Yeah for a colleague to review

tawny temple
#

Fair enough

#

Sounds like you're doing it right idk why it doesn't work

sand pivot
#

Np I'll see what I can do. Thanks for your help

sand pivot
#

Do i have the right git workflow:

  1. create local dir
  2. run git init in this dir
  3. create a remote dir
  4. clone remote dir into local dir via `git clone <remote URL>
  5. create working branch via git checkout -b work-in-progress
  6. commit changes to work-in-progress
    7.push changes
rain kiln
#
  1. Optional: cd into a directory in which you want a single directory containing the git repository (I use ~/dev, some use ~/src, still others skip this step). In my case I would now be at /home/inetknght/dev.

  2. Clone remote repository. git clone ${giturl} where giturl could be for example https://github.com/inetknght/linux-profile (Github via HTTPS) or git@github.com:inetknght/linux-profile (Github via SSH) or inetknght@localserver:path/from/homedir (localserver via SSH). In my case, I would now have /home/inetknght/dev/linux-profile. Inside of linux-profile would be the context you can see in my Github repository page.

  3. Create working branch. Make sure to cd into the repository directory first. cd linux-profile && git checkout -b inetknght/task-id-task-name. That will branch from the current HEAD of the default branch (typically master); the branch name will be inetknght/task-id-task-name. Its HEAD commit will be identical to the default branch.

  4. Stage changes using git add changedfile

  5. Commit changes using git commit. Optionally, append -S to sign the commit using a GPG key, or error if that's not configured. Many people don't sign commits and omit that flag.

  6. Push changes to the default remote using git push. Depending on how you created your local copy of the repository (git clone vs git init), Git may complain that there a default remote hasn't been set up and may tell you how to create one.

vivid cargo
#

when you are cloning usually you already get git/ directory
meaning, git init is not needed

#

@sand pivot

sand pivot
#

Thanks everyone!

misty rune
#

hey Pycharm is not recognizing breakpoint(), is that normal?

prisma nexus
#

working for me just fine?

misty rune
#

can the script be run with breakpoint()?

prisma nexus
#

it looks like you're running 3.6.x, wasn't brakpoint() introduced in 3.7?

#

@misty rune

proven creek
#

hello, where can I ask questions about parsers/PLY library?

misty rune
#

@prisma nexus doh, of course I didn't even notice

prisma nexus
#

dw i've been there

regal anvil
#

I'm using Wing IDE to write my code, but now when I'm trying to save it and close, the software prompts me to save my work before quitting. When I select to save and quit, that window closes but the software window and python file remains open. Is something wrong? Will I lose my progress if I force shutdown or tell it to quit without saving (even though I have clicked save multiple times)

#

Nevermind, I found the issue. The issue was that there was still a unicode symbol in my code, preventing it from saving. Though it didn't notify me of it this time for some reason.

cold gate
#

Ah, thanks for letting us know.

#

I'm not familiar with Wings, but i'll keep it in mind for when someone else experiences something similar

rare forge
#

what is the best ide other that pycharm

cold gate
#

That depends on what your field is. Some people like Spyder for scientific computing/statistics, but Visual Studio (the full IDE, not the VS Code code editor) is getting more and more Python support as well.

#

There are also a lot of code editors that you can extend with plugins/packages to give you IDE-like features. Sublime can be used in that way, at least, and I think Visual Studio Code has some decent support as well. However, they're not full-blown IDEs, are less feature-rich, and probably depend on third-party packages/plugins to give you the functionality

lavish cosmos
#

emacs

cold gate
#

emacs certainly has a strong following, I think Raymond Hettinger uses it as well (iirc from his talks)

vivid cargo
#

Atom

dire quartz
#

vim is pretty extensible too

#

If you're a DIY kinda person.

cold gate
#

I think that requirement goes for both emacs and vim, but people who use those are very happy with their setups

runic kindle
#

i like vsc

clear grail
#

hey guys i am wondering if i could build a data checking tool that checks the column types against a .csv file being uploaded and if it passes the check it uploads to AWS S3 storage. If it fails the check it should display a message with the column names. It should have a gui and all that. I want it to work like a web app that is hosted on AWS

heavy knot
#

does git merge merge FROM a branch or TO a branch

#

like if you are on branch a

#

and you do git merge branchB

#

does it take changes from B and push it to A

#

or vice versa?

violet belfry
#

from the specified branch (or branches) to the currently checked out branch

tawny temple
#

PyCharm Pro's Docker integration has been disappointing so far...

#

Had to resort to a bash run configuration: bash ""docker build -f docker/Dockerfile -t pythondiscord/snekbox:latest . && docker rmi $(docker images -f "dangling=true" -q)""

#

Yeah the double quotes are cause PyCharm escapes quotes

#

And I wanna use -c

#

PyCharm is too dumb to work with dockerfiles when they are in a subfolder of the root

#

Not like it matters since I need to run a command after the run config whereas they only offer config for before.

#

Pretty shit if you ask me

short tusk
#

hi would you recommend pycharm for a beginner

misty jungle
#

anyone on here??

eternal flicker
#

!ask @misty jungle if you have a question, it's better to just ask

rancid schoonerBOT
#
ask

Asking good questions will yield a much higher chance of a quick response:

• Don't ask to ask your question, just go ahead and tell us your problem.
• Try to solve the problem on your own first, we're not going to write code for you.
• Show us the code you've tried and any errors or unexpected results it's giving
• Keep your patience while we're helping you.

You can find a much more detailed explanation on our website.

tawny temple
#

What tools would you all recommend for testing REST APIs?

#

I'm looking for something lightweight and quickly configurable.

#

Right now I just use a Python REPL with requests imported

slow wasp
#

manual testing or automated?

tawny temple
#

Manual

slow wasp
#

if you want to do it manually I can highly recommend PAW for MacOS , I think it has a free version with some limitations

#

otherwise you can use good old postman