I tried to install PySimulator: https://github.com/PySimulator/PySimulator
After following the first step: "Start "Install PySimulator.bat". This batch file installs the 32 Bit Python(x,y) and all other necessary packages.", there isn't a "PySimulator-Icon" only a Python(x,y)-Icon.
1. Is this correct? I don't know how to use this..
2. How can I open the GUI "Simulation and Analysis Environment", like it is shown here: http://elib.dlr.de/81304/1/PySimulator-MODPROD.pdf
Thankful for any help!
When I'm trying to install it via conda like in https://modelica.org/events/modelica2017/documents/3ds_TestingTutorialSlides.pdf
(slide 43)
It works until
python setup.py install
Then I get the following error:
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.34.tar.gz
Traceback (most recent call last):
File "setup.py", line 5, in <module>
distribute_setup.use_setuptools()
File "C:\pysim\src\distribute_setup.py", line 154, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File "C:\pysim\src\distribute_setup.py", line 133, in _do_download
to_dir, download_delay)
File "C:\pysim\src\distribute_setup.py", line 203, in download_setuptools
src = urlopen(url)
File "C:\Users\annes\AppData\Local\conda\conda\envs\PySim\lib\urllib2.py", line 154, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\annes\AppData\Local\conda\conda\envs\PySim\lib\urllib2.py", line 435, in open
response = meth(req, response)
File "C:\Users\annes\AppData\Local\conda\conda\envs\PySim\lib\urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Users\annes\AppData\Local\conda\conda\envs\PySim\lib\urllib2.py", line 473, in error
return self._call_chain(*args)
File "C:\Users\annes\AppData\Local\conda\conda\envs\PySim\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Users\annes\AppData\Local\conda\conda\envs\PySim\lib\urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 403: SSL is required
If the installation was succuessful and only the icon is missing you should be able to start PySimulator from the command line with
python.exe -m PySimulator
Did you see the Wiki? It links mostly to C. Gohlke's repository. If any dependency is missing by now, let me know, I have them archived locally.
Related
I am making a simple youtube video downloader.It download videos without any errors but when i try to download this "video" it gives error.I have downloaded this video many times before without any errors.
Traceback (most recent call last):
File "c:\Users\Roshaan\AppData\Local\Programs\Python\Python39\Python\jarvis\test1.py", line 15, in <module>
d = yt.streams.filter(res = "240p").first()
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\__main__.py", line 311, in streams
return StreamQuery(self.fmt_streams)
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\__main__.py", line 214, in fmt_streams
if "adaptive_fmts" in self.player_config_args:
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\__main__.py", line 188, in player_config_args
self._player_config_args = self.vid_info
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\__main__.py", line 281, in vid_info
return dict(parse_qsl(self.vid_info_raw))
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\__main__.py", line 109, in vid_info_raw
self._vid_info_raw = request.get(self.vid_info_url)
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\request.py", line 53, in get
response = _execute_request(url, headers=extra_headers, timeout=timeout)
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\site-packages\pytube\request.py", line 37, in _execute_request
return urlopen(request, timeout=timeout) # nosec
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 523, in open
response = meth(req, response)
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 632, in http_response
response = self.parent.error(
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 561, in error
return self._call_chain(*args)
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 494, in _call_chain
result = func(*args)
File "C:\Users\Roshaan\AppData\Local\Programs\Python\Python39\lib\urllib\request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
I don't understand why this happens.I saw same questions asked by others and updated pytube which accepted solution by others but that didn't worked for me.This is the my code
yt = YouTube("https://www.youtube.com/watch?v=wZ6W3ryNVNE&list=PLqzeul28y04UGw8RHAN37Gjh0ZLmg3-qe")
d = yt.streams.filter(res = "240p").first()
d.download()
This error is a reoccurring issue with the pytube package. It seems to be fixed after each update but then it goes back to this issue. If you have ran pip install --upgrade pytube and the problem is still there then you'll have to wait for the next update.
While waiting, I'd suggest you using an alternative to pytube... youtube_dl you might want to check this out as it is more reliable. Official website, installation.
This is my first attempt with python, Im trying to use an external library for xml parsing for python 3.6.
I'm getting an error which doesn't seem to have anything to do with my code, and I can't figure out what the problem is from the error output
my code:
import untangle
x = untangle.parse(r"C:\file.xml")
error:
Traceback (most recent call last):
File "C:/Project/Main.py", line 2, in <module>
x = untangle.parse(r"C:\file.xml")
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\site-packages\untangle.py", line 177, in parse
parser.parse(filename)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\xml\sax\expatreader.py", line 111, in parse
xmlreader.IncrementalParser.parse(self, source)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\xml\sax\xmlreader.py", line 125, in parse
self.feed(buffer)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\xml\sax\expatreader.py", line 217, in feed
self._parser.Parse(data, isFinal)
File "..\Modules\pyexpat.c", line 668, in ExternalEntityRef
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\xml\sax\expatreader.py", line 413, in external_entity_ref
"")
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\xml\sax\saxutils.py", line 364, in prepare_input_source
f = urllib.request.urlopen(source.getSystemId())
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 223, in urlopen
return opener.open(url, data, timeout)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 532, in open
response = meth(req, response)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 570, in error
return self._call_chain(*args)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 504, in _call_chain
result = func(*args)
File "C:\Users\user\AppData\Local\Programs\Python\Python36\lib\urllib\request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden
I'm using Django and i'm trying to run this lib 'translate' or 'goslate' so I can translate text from google translate in runtime and free.
for goslate:
this is my function
import goslate
gs = goslate.Goslate()
translate = gs.translate(txt,target,source)
when I work locally it's working great and I'm getting the translation for the given 'txt'
I deploy my django app to herokuapp.com I got an error
this is the error:
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/app/.heroku/python/lib/python2.7/site-packages/goslate.py", line 409, in translate
return _unwrapper_single_element(self._translate_single_text(text, target_language, source_language))
File "/app/.heroku/python/lib/python2.7/site-packages/goslate.py", line 334, in _translate_single_text
results = list(self._execute(make_task(i) for i in split_text(text)))
File "/app/.heroku/python/lib/python2.7/site-packages/goslate.py", line 203, in _execute
yield each()
File "/app/.heroku/python/lib/python2.7/site-packages/goslate.py", line 332, in <lambda>
return lambda: self._basic_translate(text, target_language, source_lauguage)[0]
File "/app/.heroku/python/lib/python2.7/site-packages/goslate.py", line 251, in _basic_translate
response_content = self._open_url(url)
File "/app/.heroku/python/lib/python2.7/site-packages/goslate.py", line 181, in _open_url
response = self._opener.open(request, timeout=self._TIMEOUT)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 469, in error
result = self._call_chain(*args)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 656, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 437, in open
response = meth(req, response)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 550, in http_response
'http', request, response, code, msg, hdrs)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 475, in error
return self._call_chain(*args)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 409, in _call_chain
result = func(*args)
File "/app/.heroku/python/lib/python2.7/urllib2.py", line 558, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable
why locally it's working great and on heroku it's not? how can I fix it?
or a new translation lib that it's free
I found the problem,
google translate block the request from heroku
i need to use proxy server so google translate will not think that i'm a robot
there is an free app that i found in heroku named "fixie" i think it will do the trick
I'm using python 3.2.2. If I try to do:
urllib.request.urlopen('https://pypi.python.org/simple/babel')
I get following error message:
Traceback (most recent call last):
File "solver.py", line 93, in <module>
generateMetadata('babel')
File "solver.py", line 76, in generateMetadata
linklist = parseURL(name)
File "solver.py", line 20, in parseURL
resp = opener.open(REP_URL+name+'/')
File "/usr/lib/python3.2/urllib/request.py", line 375, in open
response = meth(req, response)
File "/usr/lib/python3.2/urllib/request.py", line 487, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python3.2/urllib/request.py", line 407, in error
result = self._call_chain(*args)
File "/usr/lib/python3.2/urllib/request.py", line 347, in _call_chain
result = func(*args)
File "/usr/lib/python3.2/urllib/request.py", line 560, in http_error_302
headers, fp)
urllib.error.HTTPError: HTTP Error 301: Moved Permanently - Redirection to url '/simple/Babel' is not allowed
After searching I found that it should handle redirects automatically.
So it seems, there is a bug in the Python Versions 3.2.0 to 3.2.2.
If you know the user of your program are gonna use this version, you can try monkey patching. (Overwriting the Module with the patched one from 3.2.3 if they're using one of the faulted versions)
Theres the corresponding Bug report: http://bugs.python.org/issue13696
When I setup, I get:
C:\Python27>python Lib\site-packages\rdflib-master\setup.py
Traceback (most recent call last):
File "Lib\site-packages\rdflib-master\setup.py", line 64, in <module>
version = find_version('rdflib/__init__.py')
File "Lib\site-packages\rdflib-master\setup.py", line 59, in find_version
for line in open(filename):
IOError: [Errno 2] No such file or directory: 'rdflib/__init__.py'
The file is there, and I've tried adding the package path to PYTHONPATH; no luck.
So I tried using ez_setup.py, but that chokes on some url that gives it a 404 (trace below).
I've also searched for general installation advice: I find pre-K and postgrad, but nothing that helps me.
Downloading http://cheeseshop.python.org/packages/2.7/s/setuptools/setuptools-0.6c5-py2.7.egg
Traceback (most recent call last):
File "Lib\site-packages\rdflib-master\ez_setup.py", line 223, in <module>
main(sys.argv[1:])
File "Lib\site-packages\rdflib-master\ez_setup.py", line 155, in main
egg = download_setuptools(version, delay=0)
File "Lib\site-packages\rdflib-master\ez_setup.py", line 137, in download_setuptools
src = urllib2.urlopen(url)
File "C:\Python27\lib\urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "C:\Python27\lib\urllib2.py", line 400, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 513, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 432, in error
result = self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 619, in http_error_302
return self.parent.open(new, timeout=req.timeout)
File "C:\Python27\lib\urllib2.py", line 400, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 513, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 438, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 372, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 521, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 404: Not Found
We need a bit more info I am afraid. Which version of RDFLib? How are trying to install?
Can we have the full error message?
The best way is to use "pip", install it somehow: http://www.pip-installer.org/en/1.3.X/installing.html
and then do
pip install rdflib
This will install the newest RDFLib 3.2.X!
It's a strange idea to put the source into Lib\site-packages but if you want to install from sources you need to call setup.py from the source directory. It complains that rdflib/__init__.py doesn't exist because it doesn't exist: note that the path is relative.