How can I fix a python error called "is not UTF-8 encoded"? - utf-8

enter image description here
I'm using Anaconda 3. Whenever I try to open a non-.py file (like .npy), I get this error in the image above.
Anyone know why?

Related

Cannot run scripts in Rstudio

I'm working through some exercises in an Introduction to R book (A Dummy's Book to be specific). I am running Rstudio version 1.1.447. I Enter the following script
h <-hello
yourname <-readline("What is your name")
Print(paste(h,yourname))
I then press Ctrl+Shift+S. When I do this, I get the following error message:
Error in file(con, "w") : cannot open the connection
In addition: Warning message:
In file(con, "w") :
cannot open file 'C:/Users/efami/OneDrive/Documents/.active-rstudio-document': Permission denied
I am running RStudio in Administrative Mode in a Windows 10 system. I do not understand where this path is coming from (it's obviously picking up something in my environment) or how to get past this problem.
I still don't know why it picked up the directory shown in the error message but the trick is to override the directory by creating a .Renviron file. The instructions on how to do this are found here:
Change temporary directory

Error in publishing to RPubs from Rstudio

I installed the latest version of RStudio (RStudio 1.1.423 - Windows Vista / 7/8/10).
I'm trying to publish to RPubs, but in Global Options does not appear the option for Rpubs.
When I request Publish Document, the following error appears: Error occurred while executing method.
Rprofile:
I entered the command: options (rpubs.upload.method = "internal") at line 25 of Rprofile, but it did not resolve.
The solution is provided by a careful rereading of http://rstudio-pubs-static.s3.amazonaws.com/25030_8e9c9ffc3b3c423d9381d81543423502.html
"Put in options(rpubs.upload.method = “internal”) and no other text at all". Meaning that this line of code is the only code present in the .Rprofile file.
Previously I had been adding the line to a copy of the rest of the Rprofile text. The unnecessary code was the culprit.
I had the same error before. Turns out it was due to having an accent mark in a folder name from my directory (í). I just modified that one folder name and it worked fine.

Trouble Creating and Executing an Intel SGX Enclave

I'm very new to SGX and wanted to start with something simple. Fortunately, I found this very basic tutorial. Unfortunately, as simple as it is, I can't get it to work. The code executes, but there are errors in the output.
[sgx_create_enclavew ..\urts\win\urts.cpp:195] Couldn't open file with CreateFile()
error 0x200f, failed to create enclave.
Buffertests:
Buffer before change: Hello World!
Buffer after change: Hello World!
Stringtests:
Returned Secret:
Saved Secret: My secret string
Load Secret:
Integertests:
secretIntValue first load: 0
saved a 1337 to the enclave.
secretIntValue second load after 1337 was saved: 0
error, failed to destroy enclave.
image of output
the tutorial says:
If you get the error SGX couldn't find the enclave file. The solution is to move the enclave_test_save.signed.dll into the same folder where the app_test_save.exe is located.
which I've tried, but it didn't solve the problem.
when I try to create the enclave using:
sgx_create_enclave(ENCLAVE_FILE, SGX_DEBUG_FLAG, &token, &updated, &eid, NULL);
it returns: SGX_ERROR_ENCLAVE_FILE_ACCESS
could the problem be a result of using a different version of Visual Studio? (The tutorial uses VS 2012, while I'm using VS 2015)
Did you run the application through command prompt or from IDE?
If you are using IDE, You need to change the debugging properties to $(OutDir) from $(ProjecttDir) under Project Properties->Configuration Properties->Debugging->Working Directory.(Both Enclave and Application) Select the Intel(R) SGX Debugger.
Disclaimer: I had the same error although under a different setting (Ubuntu, eclipse) so I am not sure to what extent this will help.
Before initialize_enclave() is called (which in turn calls sgx_create_enclave()), a chdir(absolutePath) command needs to be executed, where absolutePath needs to be the absolute path to where your executable is.
My error was due to a wrong path I used.
Thanks, I solved it. turns out I had to place enclave_test_save.signed.dll in the root folder with the .edl file and not with the .exe file.

Tesseract "Failed loading language..." on windows cmd

Windows 7, Tesseract 3.02
All I'm trying to do is run "tesseract img.jpg img" from cmd.exe.
I'm running it from my C:\...\Tesseract-OCR directory.
But I get the error:
Error opening data file
C:\...\Tesseract-OCR\tessdata/tessdata/eng.traineddata
Please make sure the TESSDATA_PREFIX environment variable is set to
the parent directory of your "tessdata" directory.
Failed loading language 'eng'
Tesseract couldn't load any languages!
Could not initialize tesseract.
How can I fix this?
This problem has been brought up many times it seems (around the web), but no answers I've come across have done me any good.
I've tried doing "set TESSDATA_PREFIX=C:\...\Tesseract-OCR" but nothing changes.
Does it have to do with the reversal of the backslashes|forward slashes in the path?
Reinstalled.... works fine now :B
Correct Output:
Tesseract Open Source OCR Engine v3.02 with Leptonica

Magento 1.11.1 EE cli-install crashes - Mage/Reports duplicate install script

I'm trying to install Magento 1.11.1 EE from command line.
The installation crashes at some point throwing the following error:
ERROR: Error in file: "/app/code/core/Mage/Reports/data/reports_setup/data-install-1.6.0.0.php"
A page URL key for specified store already exists.
Looking at the source code I found that there are 3 scripts that are doing the same thing:
/app/code/core/Mage/Reports/sql/reports_setup/mysql4-install-0.7.1.php (initial script)
/app/code/core/Mage/Reports/sql/reports_setup/mysql4-upgrade-0.7.0-0.7.1.php ( ??? basically doing the same thing as the one above but with DROP TABLE IF EXISTS)
/app/code/core/Mage/Reports/data/reports_setup/data-install-1.6.0.0.php
The fix for this would be to remove (by patch of course) one of the scripts (preferably the last one) but I'm trying to understand if this is something that should be there or just a stupid mistake.
You can refere at the link below if you don't have the code opened:
http://www.magentodocs.org/1.7.0.2/d5/dde/_reports_2data_2reports__setup_2data-install-1_86_80_80_8php_source.php

Resources