python dash failed to fetch, failed to read from JSON - python

Recently i have been working with dash, and randomly but rarely these two errors show up. I have no idea why. My program is huge and i do not know what is the problematic part of it. I cannot really replicate the errors. Do you have any suggestions what to look for?
At the failed to fetch problem this is a more detailed error:
dash.exceptions.DependencyException: "dash_renderer" is registered but the path requested is not valid.

Related

how to create a manifest.xml for a .msix for the Windows Store?

I'm finding lots of trouble to make a manifest.xml for the windows store.
Each time I fix a problem, another error appears.
Is there a good way to make it without many errors?
the last one was this one: (I will edit this later)
Please, can some one help me with this? I'm traying to upload a msix thats done from an exe thats done from a .py with dash and plotly
I tried fixing errors, but seems to never end.

why EvtBadHeaderError appears when reading an .evt file in obspy

I am using a command called read on the Obspy library in Python. I am just trying to read a .evt file. However the following error appears:
EvtBadHeaderError: Bad Frame values
And my code is:
from obspy import readdt = read('evtfile.evt',format='KINEMETRICS_EVT')
I searched for it and this error comes from this EvtBadHeaderError webpage. I tried to contact someone on the obspy forum page but i didn't get any answer. So i am just trying to find out where this error comes from. So i am trying to "decode" this error but it is a little bit difficult for me to understand. I would appreciate if someone could explain me why this is happening. I dont't know if it is good that i ask this question here but it is about my master and i really need to find why this error appears. Thanks!!

wrangling data in jupyter notebooks

Error whilst trying to gather twitter data.
I have been given some info for twitter API but it seems i have problems even copying and pasting. When looping through the data it keeps failing, could someone point me in the direction of what is going wrong please?
https://gist.github.com/PWynter/fddecee280b6a398e2a03e129b4dbb46
i must be blind as i really can't see the error
https://gist.github.com/PWynter/fddecee280b6a398e2a03e129b4dbb46
Expected the return of print success

Extremely new user to Python. "No module named request" error while trying code to detect image subdomains in a website to extract them to a folder

I may sound rather uninformed writing this, and unfortunately, my current issue may require a very articulate answer to fix. Therefore, I will try to be specific as possible as to ensure that my problem can be concisely understood.
My apologizes for that- as this Python code was merely obtained from a friend of mine who wrote it for me in order to complete a certain task. I myself had had extremely minimal programming knowledge.
Essentially, I am running Python 3.6 on a Mac. I am trying to work out a code that allows Python to scan through a bulk of a particular website's potentially existent subdomains in order to find possibly-existent JPG images files contained within said subdomains, and download any and all of the resulting found files to a distinct folder on my Desktop.
The Setup-
The code itself, named "download.py" on my computer, is written as follows:
import urllib.request
start = int(input("Start range:100000"))
stop = int(input("End range:199999"))
for i in range(start, stop + 1):
filename = str(i).rjust(6, '0') + ".jpg"
url = "http://website.com/Image_" + filename
urllib.request.urlretrieve(url, filename)
print(url)
(Note that the words "website" and "Image" have been substituted for the actual text included in my code).
Before I proceed, perhaps some explanation would be necessary.
Basically, the website in question contains several subdomains that include .JPG images, however, the majority of the exact URLs that allow the user to access these sub-domains are unknown and are a hidden component of the internal website itself. The format is "website.com/Image_xxxxxx.jpg", wherein x indicates a particular digit, and there are 6 total numerical digits by which only when combined to make a valid code pertain to each of the existent images on the site.
So as you can see, I have calibrated the code so that Python will initially search through number values in the aforementioned URL format from 100000 to 199999, and upon discovering any .JPG images attributed to any of the thousands of link combinations, will directly download all existent uncovered images to a specific folder that resides within my Desktop. The aim would be to start from that specific portion of number values, and upon running the code and fetching any images (or not), continually renumbering the code to work my way through all of the possible 6-digit combos until the operation is ultimately a success.
(Possible Side-Issue- Although I am fairly confident that my friend's code is written in a manner so that Python will only download .JPG files to my computer from images that actually do exist on that particular URL, rather than swarming my folder with blank/bare files from every single one of URL attempts regardless of whether that URL happens to be successful or not, I am admittedly not completely certain. If the latter is the case, informing me of a more suitable edit to my code would be tremendously appreciated.)
The Execution-
Right off the bat, the code experienced a large error. I'll list through the series of steps that led to the creation of said error.
#1- Of course, I first copy-pasted the code into a text document, and saved it as "download.py". I saved it inside of a folder named "Images" where I sought the images to be directly downloaded to. I used BBEdit.
#2- I proceeded, in Terminal, to input the commands "cd Desktop/Images" (to account for the file being held within the "Images" folder on my Desktop), followed by the command "Python download.py" (to actually run the code).
As you can see, the error which I obtained following my attempt to run the code was the ImportError: No module named request. Despite me guessing that the answer to solving this is simple, I can legitimately say I have got such minimal knowledge regarding Python that I've absolutely no idea how to solve this.
Hint: Prior to making the download.py file, the folder, and typing the Terminal code the only interactions I made with Python were downloading the program (3.6) and placing it in my toolbar. I'm not even quite sure if I am required to create any additional scripts/text files, or make any additional downloads before a script like this would work and successfully download the resulting images into my "Images" folder as is my desired goal. If I sincerely missed something integral at any point during this long read, hopefully, someone in here can provide a thoroughly detailed explanation as to how to solve my issue.
Finishing statements for those who've managed to stick along this far:
Thank you. I know this is one hell of a read, and I'm getting more tired as I go along. What I hope to get out of this question is
1.) Obviously, what would constitute a direct solution to the "No module named request" Input Error in Terminal. In other words, what I did wrong there or am missing.
2.) Any other helpful information that you know would assist this code, for example, if there is any integral step or condition I've missed or failed to meet that would ultimately cause the entirety of my code to cease to work. If you do see a fault in this, I only ask of you to be specific, as I've not got much experience in the programming world. After all, I know there is a lot of developers out here that are far more informed and experienced than am I. Thanks.
urllib.request is in Python 3 only. When running 'python' on a Mac, you're running Python 2 by default. Try running executing with python3.
python --version
might need to
brew install python3
urllib.request is a Python 3 construct. Most systems run Python 2 as default and this is what you get when you run simply python.
To install Python 3, go to https://brew.sh/ and follow the instructions to install the Hombrew package manager. Then run
brew install python3
python3 download.py

Implementing DCT2/DCT3 in Python

I am having some issues with my code for doing the final implementation for a data to image library using the JPEG DCT2/3 process. Linked below is the source code that I am using. I am using the python code under the SageMathCloud. I've been trying to figure out this specific error for the past several hours, and no matter how I do it, it just doesn't work. I get the same error message everytime, and I just can't track down the reason why.
Gist

Categories