Category : python

I have the following error: [nltk_data] Downloading package stopwords to [nltk_data] /Users/xz/nltk_data… [nltk_data] Package stopwords is already up-to-date! [nltk_data] Downloading package words to /Users/xz/nltk_data… [nltk_data] Package words is already up-to-date! /Users/xupinz/Library/Python/3.8/lib/python/site-packages/spacy/util.py:738: UserWarning: [W094] Model ‘en_core_web_sm’ (2.2.5) specifies an under-constrained spaCy version requirement: >=2.2.2. This can lead to compatibility problems with older versions, or as new ..

Read more

i was trying to use tabs in dearpygui and it gives me this error: Traceback (most recent call last): File "c:main.py", line x, in <module> with dpg.add_tab_bar(): AttributeError: __enter__ i tried to do it like this add_tab_bar(‘tabbar’) add_tab(‘tab1’) end_tab() end_tab_bar() id didnt work to the code: import dearpygui.dearpygui as dpg with dpg.window(label="window") as mainwind: with ..

Read more

Given this code, how do you print ‘res’ and ‘time_count’ corresponding ‘target’ values ? In other words, the code should consider the location of the ‘res’ and ‘time_count’ values and print out the values of ‘target’ located in the same row. in this code, res = [‘time=0:1’, ‘time=2:2’, ‘time=3:1’] which means that time=0 is the ..

Read more

Suppose I am building a python package which has a Cython extension that needs compilation, and this package is to be installed using setuptools. I can usually add extra compilation arguments by sub-classing Cython’s build_ext and overriding the build_extension method – example setup.py: from setuptools import setup from setuptools.extension import Extension from Cython.Distutils import build_ext ..

Read more

I’m trying to write values above 1000 using the minimalmodbus library, but my code generates the following error: Traceback (most recent call last): File "D:/Projetos/ON/HMI/modbus_tk_test.py", line 19, in <module> instrument.write_register(38, 1001) File "D:ProjetosONHMIvenvlibsite-packagesminimalmodbus.py", line 511, in write_register self._generic_command( File "D:ProjetosONHMIvenvlibsite-packagesminimalmodbus.py", line 1177, in _generic_command payload_from_slave = self._perform_command(functioncode, payload_to_slave) File "D:ProjetosONHMIvenvlibsite-packagesminimalmodbus.py", line 1250, in _perform_command payload_from_slave ..

Read more

In my .html file, I have used: <img href="{{ url_for(‘static’, filename=’/images/logo.png’) }}" alt="highbrow"> This is not rendering the image. My file structure looks like this: /projects /highbrow app.py /highbrow __init__.py main.py /templates /static (bunch of .css files) /js (bunch of .js files) /images (bunch of images) The init.py is like: create_app(): app = Flask(__name__) bcrypt.init_app(app) ..

Read more