Open rickybass opened 4 years ago
Hi, Thanks for reaching. I'm going to assume the two files are not in the Carnets application folder, but in the folder of a different application.
If that is indeed the case, the explanation is simple: iOS has very restrictive file access permissions. An application can only access files in its own directory, and files for which it received explicit permission. When you clicked on the notebook to open it, you explicitly granted Carnets permission to open the notebook. But that permission does not extend to other files, even if they are in the same directory.
The solution is simple: you need to also grant Carnets permission to access the entire directory. There is a button for this in the user interface, the one that looks like a folder (circled in red in the first image).
Once you click it, you see a menu where you can select a folder. Navigate to the folder enclosing the notebook and the excel file, and click "Done".
Once this is done, your notebook has access to the entire directory, and thus to the excel file.
If my original assumption was wrong, let's keep talking.
I think I did the way you instructed.itried both in the Carnets folder on my iPad as well as carnets folder in iCloud
Thanks
Thanks
Ricky Bass
Pat F. Bass III, MD, MS, MPH Professor of Medicine and Pediatrics LSU Health Shreveport P: 318-675-6490 C: 318-573-9413 F: 318-675-8150
On May 12, 2020, at 2:35 PM, Nicolas Holzschuch notifications@github.com wrote:
EXTERNAL EMAIL: EVALUATE
Hi, Thanks for reaching. I'm going to assume the two files are not in the Carnets application folder, but in the folder of a different application.
If that is indeed the case, the explanation is simple: iOS has very restrictive file access permissions. An application can only access files in its own directory, and files for which it received explicit permission. When you clicked on the notebook to open it, you explicitly granted Carnets permission to open the notebook. But that permission does not extend to other files, even if they are in the same directory.
The solution is simple: you need to also grant Carnets permission to access the entire directory. There is a button for this in the user interface, the one that looks like a folder (circled in red in the first image).
https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F8070736%2F81737219-0f3fca00-9498-11ea-8595-31135a0595dc.jpg&data=02%7C01%7Cpbassi%40lsuhsc.edu%7Cfea3f1e43b1944dcb47608d7f6ab9282%7C3406368982d44e89a3281ab79cc58d9d%7C0%7C0%7C637249089092988892&sdata=TuLb9KDWPU7LPJz0p5zSETJiw9Vi1HZT36M7kMCzmJU%3D&reserved=0 Once you click it, you see a menu where you can select a folder. Navigate to the folder enclosing the notebook and the excel file, and click "Done".
https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F8070736%2F81737282-2da5c580-9498-11ea-92eb-3bfa03f3df0c.jpg&data=02%7C01%7Cpbassi%40lsuhsc.edu%7Cfea3f1e43b1944dcb47608d7f6ab9282%7C3406368982d44e89a3281ab79cc58d9d%7C0%7C0%7C637249089092998887&sdata=0%2B1ICpfVTo3Gyql0KAO6EPf1naQRJWc%2FknegFMtM0S8%3D&reserved=0 Once this is done, your notebook has access to the entire directory, and thus to the excel file.
If my original assumption was wrong, let's keep talking.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fholzschu%2FCarnets%2Fissues%2F101%23issuecomment-627548916&data=02%7C01%7Cpbassi%40lsuhsc.edu%7Cfea3f1e43b1944dcb47608d7f6ab9282%7C3406368982d44e89a3281ab79cc58d9d%7C0%7C0%7C637249089093008886&sdata=hTRynZMYNhW86WOcVSsae1Rd68VXTsNFLNMWcRhDGSg%3D&reserved=0, or unsubscribe https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGB2TI63QS3JHBIXX3SNUVLRRGQGRANCNFSM4M7BGODA&data=02%7C01%7Cpbassi%40lsuhsc.edu%7Cfea3f1e43b1944dcb47608d7f6ab9282%7C3406368982d44e89a3281ab79cc58d9d%7C0%7C0%7C637249089093008886&sdata=1rADD%2F7j3fln5jEe%2F7CuoC5U0RLlriRcXE47LoXaXxM%3D&reserved=0.
It seems that to load Excel files, you need to add the "xlrd" package. "!pip install xlrd" should do the trick. Let me know if it works.
I am getting the same error
Thanks
Ricky Bass
Pat F. Bass III, MD, MS, MPH Professor of Medicine and Pediatrics LSU Health Shreveport P: 318-675-6490 C: 318-573-9413 F: 318-675-8150
On May 15, 2020, at 1:36 PM, Nicolas Holzschuch notifications@github.com wrote:
EXTERNAL EMAIL: EVALUATE
It seems that to load Excel files, you need to add the "xlrd" package. "!pip install xlrd" should do the trick. Let me know if it works.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fholzschu%2FCarnets%2Fissues%2F101%23issuecomment-629415253&data=02%7C01%7Cpbassi%40lsuhsc.edu%7C47d50babad24490bc1f108d7f8fee9ce%7C3406368982d44e89a3281ab79cc58d9d%7C0%7C0%7C637251646040621220&sdata=ZzKWi3DXXYW%2FlkkBfbF6Ltj2l28WgZAX3XV1QQTqf54%3D&reserved=0, or unsubscribe https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAGB2TI4OMFFHP7M2SIRFQPDRRWDTVANCNFSM4M7BGODA&data=02%7C01%7Cpbassi%40lsuhsc.edu%7C47d50babad24490bc1f108d7f8fee9ce%7C3406368982d44e89a3281ab79cc58d9d%7C0%7C0%7C637251646040631217&sdata=TL2HRpMcPyh71VpGXbEsmiyoXEkAtO8WAk8UTgSJ9VE%3D&reserved=0.
Can you attach the notebook and Excel file here so I can have a look?
I was able to covert it to an excel spreadsheet and get it to work as you can see.
Hi @holzschu - I’m having the same issue. I uploaded the notebook and excel file here - https://drive.google.com/drive/u/2/folders/1N3wd06Wc-PHl1m8lR_qcEqIC8g9-1ddb
Command:
pd.read_excel('Excel_Sample.xlsx',sheet_name='Sheet1')
ImportError Traceback (most recent call last)
Please try "!pip install xlrd" to install the xlrd package, then retry loading the Excel file.
Hi, I’m getting the message below when I run “!pip install xlrd”
The excel file still doesn’t open and would give me this error instead:
ValueError: Your version of xlrd is 2.0.1. In xlrd >= 2.0, only the xls format is supported. Install openpyxl instead.
Message: `Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: xlrd in /private/var/mobile/Containers/Data/Application/30586C38-FE0F-466B-88FD-2A2173F5CDF3/Library/lib/python3.9/site-packages (2.0.1)
WARNING: You are using pip version 21.1.1; however, version 21.2.3 is available. You should consider upgrading via the '/private/var/containers/Bundle/Application/C19071B6-07E4-4187-8A3B-17EBC68D658A/Carnets.app/Library/bin/python3 -m pip install --upgrade pip' command.
Note: you may need to restart the kernel to use updated packages.`
ok, so this worked for me:
!pip install openpyxl
@holzschu thanks man - great app!
I am relatively new to Github so I apologize if this is not the appropriate place to post this. I tried Carnets on my iPad pro. Even though I have an excel file and the Jupyter notebook in the same folder Carnets cannot find it. Any thoughts how to troubleshoot?