It gets stuck on the first urequests.get()
I have tried EVERYTHING, it prompts me this error
`Traceback (most recent call last):
File "<stdin>", line 26, in <module>
File "urequests.py", line 180, in get
File "urequests.py", line 76, in request
OSError: -1
`
Help please
Tried reinstalling the uf2, flash nuking it, importing manually urequests, NOTHING, i cant finish my prject without this.
Related
I have a Python Code to conduct an experiment. To ensure that the Code is working smoothly I wanted to run a trial round via 'otree devserver', but I always get an AttributeError message and I am stuck here. Can anyone help me out?
I have downloaded the Code from GitHub and downloaded all required packages. I am using macOS, otree-5.10.2 and django-4.1.7. Here is my full traceback / error message:
Traceback (most recent call last): File
"/Users/.otreevenv/bin/otree", line 8, in
sys.exit(execute_from_command_line()) File "/Users/.otreevenv/lib/python3.10/site-packages/otree/main.py", line
108, in execute_from_command_line
setup() File "/Users/.otreevenv/lib/python3.10/site-packages/otree/main.py", line
132, in setup
from otree import settings File "/Users/.otreevenv/lib/python3.10/site-packages/otree/settings.py",
line 50, in
OTREE_APPS = get_OTREE_APPS(settings.SESSION_CONFIGS) File "/Users/.otreevenv/lib/python3.10/site-packages/django/conf/__init__.py",
line 94, in __getattr__
val = getattr(_wrapped, name) File "/Users/.otreevenv/lib/python3.10/site-packages/django/conf/__init__.py",
line 270, in __getattr__
return getattr(self.default_settings, name) AttributeError: module 'django.conf.global_settings' has no attribute 'SESSION_CONFIGS'. Did
you mean: 'SESSION_ENGINE'?
I am trying to do some basic api integration with Tableau server.
I was trying the Tableau_tools library (https://github.com/bryanthowell-tableau/tableau_tools).
I am unable to get simple create AD group or add user working. Is there something I am doing wrong?
I am able to view users/groups.
This is my code:
t = TableauServerRest37(cfg["server"], pat_name=cfg['personal_access_token_name'], pat_secret=cfg['personal_access_token_secret'], site_content_url=cfg["site_url"])
t.signin()
t.enable_logging(logger)
list_of_groups = t.groups.query_groups_json()
list_of_users = t.users.query_users_json()
#Add Users
users_to_add = ['user_1', 'user_2', 'user_3']
for user in users_to_add:
t.users.add_user(username=user, fullname=user, site_role='Publisher')
t.groups.create_group_from_ad_group( group, domain, default_site_role="ExplorerCanPublish", sync_as_background=True)
I am getting the following Error for Users:
Traceback (most recent call last):
File ".\Tableau_tools_api.py", line 117, in <module>
main()
File ".\Tableau_tools_api.py", line 82, in main
t.users.add_user(username=user, fullname=user, site_role='Publisher')
File "C:\Users\ABCD\AppData\Roaming\Python\Python37\site-packages\tableau_tools\tableau_rest_api\methods\user.py", line 164, in add_user
update_if_exists=update_if_exists, auth_setting=auth_setting)
File "C:\Users\ABCD\AppData\Roaming\Python\Python37\site-packages\tableau_tools\tableau_rest_api\methods\user.py", line 89, in add_user_by_username
if site_role not in self.rest.site_roles:
AttributeError: 'TableauServerRest37' object has no attribute 'site_roles'
I am getting the following Error for Groups:
Traceback (most recent call last):
File ".\Tableau_tools_api.py", line 117, in <module>
main()
File ".\Tableau_tools_api.py", line 88, in main
t.groups.create_group_from_ad_group( group, domain, default_site_role="ExplorerCanPublish", sync_as_background=True)
File "C:\Users\ABCD\AppData\Roaming\Python\Python37\site-packages\tableau_tools\tableau_rest_api\methods\group.py", line 74, in create_group_from_ad_group
if default_site_role not in self.rest._site_roles:
AttributeError: 'TableauServerRest37' object has no attribute '_site_roles'
I was wondering if anyone has gotten this to work for api version 3.7?
I have this problem with Spyder(in Windows 10). When I try to do anything on my spyder console (even something as simple as 1+1), I get the following error message in the internal console tab:
(Any help will be appreciated)
Traceback (most recent call last): <br> <br>
File "C:\Users\ JohnDoe \Anaconda2\lib\site-packages\qtconsole\base_frontend_mixin.py", line 163, in _dispatch<br><br>
Traceback (most recent call last):<br><br>
File "C:\Users\ JohnDoe \Anaconda2\lib\site-packages\qtconsole\base_frontend_mixin.py", line 163, in _dispatch<br><br>
handler(msg)<br><br>
File "C:\Users\JohnDoe\Anaconda2\lib\site-packages\spyder\widgets\ipythonconsole\namespacebrowser.py", line 188, in _handle_execute_reply<br><br>
self.handle_exec_method(msg)<br><br>
File "C:\Users\ JohnDoe\Anaconda2\lib\site-packages\spyder\widgets\ipythonconsole\shell.py", line 225, in handle_exec_method<br><br>
properties = ast.literal_eval(data['text/plain'])<br><br>
KeyError: 'text/plain'<br><br>
handler(msg)<br><br>
File "C:\Users\ JohnDoe\Anaconda2\lib\site-packages\spyder\widgets\ipythonconsole\namespacebrowser.py", line 188, in _handle_execute_reply<br><br>
self.handle_exec_method(msg)<br><br>
File "C:\Users\ JohnDoe\Anaconda2\lib\site-packages\spyder\widgets\ipythonconsole\shell.py", line 222, in handle_exec_method<br><br>
view = ast.literal_eval(data['text/plain'])<br><br>
KeyError: 'text/plain'
The problem gets resolved when you install Spyder 3 like Carlos mentioned
This error was fixed in Spyder 3.0.2. Please update to that version.
However, it actually does not impacts my codes or run times. The only drawback is that you cannot test your codes out on the machines which shows this error.
I have a bot made to run super hexagon (just for fun) at http://pastebin.com/X34Qxrxx
Unfortunately, whenever I run it with IDLE 3.5 32 bit, I get the error
Traceback (most recent call last):
File "C:\Users\Spencer\Desktop\Super-Hexagon-Bot\super_hexagon_bot.py", line 223, in <module>
main()
File "C:\Users\Spencer\Desktop\Super-Hexagon-Bot\super_hexagon_bot.py", line 213, in main
window_handle = win32ui.FindWindow(None, u"Super Hexagon").GetSafeHwnd()
NameError: name 'win32ui' is not defined
Can anyone help? I'm not sure how to resolve this issue
I am new to python. I am trying to use track_from_file method in pyechonest to create a track object. This is the code I wrote:
from pyechonest import config
from pyechonest.track import track_from_file
config.ECHO_NEST_API_KEY = "KRZG4XOVUQRKI45DP"
f = open("ShayneWard-NoPromises.mp3")
t = track_from_file(f, 'mp3')
But this is not working. I got an EchoNestIOError. This is the full error Traceback that i got.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build/bdist.linux-x86_64/egg/pyechonest/track.py", line 243, in track_from_file
File "build/bdist.linux-x86_64/egg/pyechonest/track.py", line 331, in track_from_md5
File "build/bdist.linux-x86_64/egg/pyechonest/track.py", line 209, in _profile
File "build/bdist.linux-x86_64/egg/pyechonest/util.py", line 257, in callm pyechonest.util.
EchoNestIOError: Echo Nest Unknown Error
Can anyone tell me what have I done wrong?
I finally figured it out. It seems that the upload does not take place through the proxy server of my university network which uses NAT.