Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [python-3.x]

DO NOT USE UNLESS YOUR QUESTION IS FOR PYTHON 3 ONLY. Always use alongside the standard [python] tag.

0 votes
0 answers
7 views

pycharm Unresolved attribute reference 'astype' for class 'ndarray'

Q: How can I fix the bug where Pychram warns about numpy.ndarray attributes? The code runs with no problem, however pycharm keeps giving this warning Unresolved attribute reference 'astype' for class '...
Electron X's user avatar
0 votes
0 answers
4 views

RDKit PandasTools WriteSDF: RuntimeError: Bad pickle format: unexpected End-of-File while reading

I face the error: PandasTools.WriteSDF(pp, args.output_file, molColName='ID', properties=list(pp.columns)) File "/scratch/micromamba/envs/biotools_py39/lib/python3.9/site-packages/rdkit/Chem/...
M.Vu's user avatar
  • 460
0 votes
0 answers
12 views

NameError Traceback (most recent call last) <ipython-input-3-9ec55f7a7976> in <module> : NameError: name 'books' is not defined

I am trying to plot the evolution of degree centrality over the books for some of the characters from Game of Thrones .I have a list evol that contains the computed degree centrality from all the ...
acharyabibash's user avatar
-2 votes
0 answers
18 views

Are staticmethods and classmethods bad practice? [closed]

In python, during a recent code review, it was pointed out that using classmethods and staticmethods is considered a bad practice because it enlarges the scope of the given class. In the specific case,...
Hsflores's user avatar
0 votes
0 answers
7 views

Unpickling Error: magic_number = pickle_module.load(f, **pickle_load_args) _pickle.UnpicklingError: invalid load key, 'v'

When I am trying to load a .pt file i am seeing the following error, str1='Dataset/ALL_feats_cgqa.pt' m = torch.load(str1) the error is as follows, File "/home/Storage1/pythonCodeArea/train.py&...
Aleph's user avatar
  • 223
0 votes
0 answers
5 views

How to separate dynaconf settings for each environment in it's own file?

Im using dynaconf 3.2.4 to load my config files. I want have seperate files for each environment: config.dev.yaml, config.test.yaml, config.prod.yaml, etc. I want to keep my files simple and do ...
Fatrago's user avatar
0 votes
0 answers
10 views

Alembic generates all models at revision

I am trying to run alembic on a database where there are about 20 tables that are created by sqlalchemy models. I am using 5 schemas to keep the tables separate from each other. When I run alembic ...
AnGeLL1337's user avatar
0 votes
0 answers
10 views

How to capture Errors from Firefox browser console using Playwright Python

I want to capture console logs from Firefox web browser using Playwright Python and attach the same to Allure Report. I am able to fetch Warnings, Logs, Info and Debug messages from browser console, ...
Divya Andrews's user avatar
-1 votes
0 answers
10 views

Cannot import name 'Markup' from 'Flask'

This ques is not a duplicate because the other solutions arent working for me. My main.py file: from flask import Flask, render_template, flash, redirect, url_for, abort from flask_login import ...
Maria Kazi's user avatar
0 votes
0 answers
4 views

when importing package dill, I encounter FileNotFoundError due to the attempt of opening os.devnull file and couldn't resolve it

Error I encountered first: I install huggingface package: datasets, when I tried to import datasets, that's when I first encounter the FileNotFoundError from package dill, its something like this: >...
Alexandar Zeng's user avatar
0 votes
0 answers
9 views

importlib.import_module() imports modules from multiple subfolders, but only the top-level directory is recognized

I use importlib.import_module() to import modules from different folders, but it only recognizes the top-level directory name. This is my environment. There are three folders a, b, and c in the test ...
Ensoleile's user avatar
0 votes
0 answers
6 views

KeyError: 'img_prefix' while running mmfewshot

I am using a custom COCO-type dataset. The classes and everything are updated, and in my log file, it can pick up my dataset and divide it according to the N-way K-shot specs I defined. But at the end,...
user181925's user avatar
-1 votes
0 answers
29 views

Why from . import Python [duplicate]

A repo I work with has a structure as follows: In myrepo/src/ there are: main.py core.py and somepkg somepkg has an __init__.py and other python files. somepkg is not a class or func in any of the ...
Ben K's user avatar
  • 7
0 votes
0 answers
12 views

python3 project issue with pipelines

i would like to find some help with my project with a experimented developer in python and this is the detail of the issue. im programming and modified a application in python3 with gtk3 and ...
cch's user avatar
  • 1
-1 votes
0 answers
13 views

Issue of exporting bar charts to excel by openpyxl

After exporting bar charts to excel by openpyxl, there is always an issue as shown when opening the excel files. But after clicking "Yes" to repair, the charts are correct with no issue. ...
Fox_field's user avatar

15 30 50 per page
1
2 3 4 5
22888